index.wxml 1.3 KB

12345678910111213141516171819202122
  1. <template name="actions">
  2. <block wx:for="{{ actions }}" wx:for-item="action" wx:key="">
  3. <view class="{{ classes.action }} {{ action.className }}" style="{{ action.style }}" data-index="{{ index }}" data-value="{{ action }}" data-type="{{ type }}" catchtap="onTap">
  4. <view class="{{ classes.text }}">{{ action.text }}</view>
  5. </view>
  6. </block>
  7. </template>
  8. <view class="wux-class {{ classes.wrap }}">
  9. <view class="{{ classes.cover }}" hidden="{{ !showCover }}" catchtouchstart="onClose" style="{{ offsetStyle }}"></view>
  10. <view class="{{ classes.left }}" wx:if="{{ useSlots || left.length > 0 }}" catchtap="onAcitons">
  11. <template is="actions" data="{{ classes, actions: left, type: 'left' }}" wx:if="{{ !useSlots }}" />
  12. <slot name="left" wx:else></slot>
  13. </view>
  14. <view class="{{ classes.right }}" wx:if="{{ useSlots || right.length > 0 }}" catchtap="onAcitons">
  15. <template is="actions" data="{{ classes, actions: right, type: 'right' }}" wx:if="{{ !useSlots }}" />
  16. <slot name="right" wx:else></slot>
  17. </view>
  18. <view class="{{ classes.content }}" catchtouchstart="onTouchStart" catchtouchmove="onTouchMove" catchtouchend="onTouchEnd" style="{{ offsetStyle }}">
  19. <slot></slot>
  20. </view>
  21. </view>