index.wxml 911 B

1234567891011121314151617181920212223242526272829303132333435
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view
  3. wx:if="{{ show }}"
  4. class="custom-class {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}"
  5. style="color: {{ color }}; background-color: {{ backgroundColor }};"
  6. bind:tap="onClick"
  7. >
  8. <van-icon
  9. wx:if="{{ leftIcon }}"
  10. size="16px"
  11. name="{{ leftIcon }}"
  12. class="van-notice-bar__left-icon"
  13. />
  14. <view class="van-notice-bar__wrap">
  15. <view class="van-notice-bar__content {{ !scrollable && !wrapable ? 'van-ellipsis' : '' }}" animation="{{ animationData }}">
  16. {{ text }}
  17. </view>
  18. </view>
  19. <van-icon
  20. wx:if="{{ mode === 'closeable' }}"
  21. class="van-notice-bar__right-icon"
  22. name="cross"
  23. bind:tap="onClickIcon"
  24. />
  25. <navigator
  26. wx:if="{{ mode === 'link' }}"
  27. url="{{ url }}"
  28. open-type="{{ openType }}"
  29. >
  30. <van-icon class="van-notice-bar__right-icon" name="arrow" />
  31. </navigator>
  32. </view>