index.wxml 887 B

12345678910111213141516171819202122232425262728293031
  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" animation="{{ animationData }}">
  12. {{ text }}
  13. </view>
  14. </view>
  15. <block wx:if="{{ mode }}">
  16. <van-icon
  17. wx:if="{{ mode === 'closeable' }}"
  18. class="van-notice-bar__right-icon"
  19. name="close"
  20. bind:tap="_handleButtonClick"
  21. />
  22. <navigator
  23. wx:if="{{ mode === 'link' }}"
  24. url="{{ url }}"
  25. open-type="{{ openType }}"
  26. >
  27. <van-icon class="van-notice-bar__right-icon" name="arrow" />
  28. </navigator>
  29. </block>
  30. </view>