index.wxml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <view
  2. wx:if="{{ show }}"
  3. class="ant-notice-bar {{ className || '' }} {{ type ? 'ant-notice-bar-' + type : '' }}"
  4. style="{{ style }}">
  5. <view class="ant-notice-bar-icon">
  6. <image-icon
  7. wx:if="{{ icon }}"
  8. image="{{ icon }}"
  9. className="ant-notice-bar-icon-image" />
  10. <icon
  11. wx:elif="{{ type === 'error' }}"
  12. type="InformationCircleOutline" />
  13. <icon
  14. wx:else
  15. type="SoundOutline" />
  16. </view>
  17. <view
  18. class="ant-notice-bar-content ant-notice-bar-content{{ $id ? '-' + $id : '' }}">
  19. <view
  20. class="ant-notice-bar-marquee ant-notice-bar-marquee{{ $id ? '-' + $id : '' }}"
  21. style="{{ marqueeStyle }} display: {{ enableMarquee ? 'inline-block' : 'block' }}"
  22. onTransitionEnd="onTransitionEnd">
  23. <slot />
  24. </view>
  25. </view>
  26. <view class="ant-notice-bar-operation">
  27. <slot name="extra" />
  28. <icon
  29. wx:if="{{ mode === 'link' }}"
  30. className="ant-notice-bar-operation-icon"
  31. type="RightOutline"
  32. bind:tap="onTap" />
  33. <icon
  34. wx:if="{{ mode === 'closeable' }}"
  35. className="ant-notice-bar-operation-icon"
  36. type="CloseOutline"
  37. bind:tap="onTap" />
  38. </view>
  39. </view>