modal.wxml 1.2 KB

123456789101112131415161718
  1. <view catchtouchmove="forbid">
  2. <view class="tui-modal-class tui-modal-box {{show?'tui-modal-show':''}} {{(fadein || show)?'tui-modal-normal':'tui-modal-scale'}}" style="width:{{width}};padding:{{padding}};border-radius:{{radius}}">
  3. <view wx:if="{{!custom}}">
  4. <view class="tui-modal-title" v-if="title">{{title}}</view>
  5. <view class="tui-modal-content {{title?'':'tui-mtop'}}" style="color:{{color}};font-size:{{size}}rpx">{{content}}</view>
  6. <view class="tui-modalBtn-box {{button.length>2?'tui-flex-column':''}}">
  7. <block wx:for="{{button}}" wx:key="{{index}}">
  8. <button class="tui-modal-btn {{'tui-'+(item.type || 'primary')+(item.plain?'-outline':'')}} {{button.length!=2?'tui-btn-width':''}} {{button.length>2?'tui-mbtm':''}} {{shape=='circle'?'tui-circle-btn':''}}" hover-class="{{'tui-'+(item.plain?'outline':(item.type || 'primary'))+'-hover'}}"
  9. data-index="{{index}}" bindtap="handleClick">{{item.text || "确定"}}</button>
  10. </block>
  11. </view>
  12. </view>
  13. <view wx:else>
  14. <slot></slot>
  15. </view>
  16. </view>
  17. <view class="tui-modal-mask {{show?'tui-mask-show':''}}" bindtap="handleClickCancel"></view>
  18. </view>