index.axml 1.2 KB

1234567891011121314151617181920212223
  1. <view class='notice-bar-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <view a:if='{{ show }}' class="{{customClass}} {{ utils.bem('notice-bar', { withicon: mode, wrapable }) }}" style='color: {{ color }}; background-color: {{ backgroundColor }}; background: {{ background }}' onTap='antmoveAction' data-antmove-tap='onClick'>
  5. <van-icon a:if='{{ leftIcon }}' size='16px' name='{{ leftIcon }}' class='van-notice-bar__left-icon' ref='saveChildRef1'>
  6. </van-icon>
  7. <slot a:else name='left-icon'>
  8. </slot>
  9. <view class='van-notice-bar__wrap'>
  10. <view class="van-notice-bar__content {{ !scrollable && !wrapable ? 'van-ellipsis' : '' }}" animation='{{ animationData }}'>
  11. {{ text }}
  12. </view>
  13. </view>
  14. <van-icon a:if="{{ mode === 'closeable' }}" class='van-notice-bar__right-icon' name='cross' onClick='onClickIcon' ref='saveChildRef2'>
  15. </van-icon>
  16. <custom-navigator a:elif="{{ mode === 'link' }}" url='{{ url }}' open-type='{{ openType }}'>
  17. <van-icon class='van-notice-bar__right-icon' name='arrow' ref='saveChildRef3'>
  18. </van-icon>
  19. </custom-navigator>
  20. <slot a:else name='right-icon'>
  21. </slot>
  22. </view>
  23. </view>