1234567891011121314151617181920212223242526272829
  1. <view
  2. wx:if="{{ show }}"
  3. class="custom-class van-notice-bar {{ hasRightIcon ? 'van-notice-bar--within-icon' : '' }}"
  4. style="color: {{ color }}; background-color: {{ backgroundColor }};"
  5. bind:tap="onClick"
  6. >
  7. <view wx:if="{{ leftIcon }}" class="van-notice-bar__left-icon">
  8. <image src="{{ leftIcon }}" />
  9. </view>
  10. <view class="van-notice-bar__content-wrap">
  11. <view class="van-notice-bar__content {{ scrollable ? '' : 'van-ellipsis' }}" animation="{{ animationData }}">
  12. {{ text }}
  13. </view>
  14. </view>
  15. <van-icon
  16. wx:if="{{ mode === 'closeable' }}"
  17. class="van-notice-bar__right-icon"
  18. name="cross"
  19. bind:tap="onClickIcon"
  20. />
  21. <navigator
  22. wx:if="{{ mode === 'link' }}"
  23. url="{{ url }}"
  24. open-type="{{ openType }}"
  25. >
  26. <van-icon class="van-notice-bar__right-icon" name="arrow" />
  27. </navigator>
  28. </view>