沙盘演示系统应用的微信小程序
zuoxiao
2024-08-28 eb3dbfdcb126beeb1d08f3306ac8f5bbc466e133
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<import src="../common/template/button.wxml" />
<import src="../common/template/icon.wxml" />
<wxs src="../common/utils.wxs" module="_" />
<wxs src="./dialog.wxs" module="this" />
 
<t-popup
  name="dialog"
  style="{{_._style([style, customStyle])}}"
  class="class"
  t-class="{{classPrefix}}__wrapper"
  visible="{{visible}}"
  showOverlay="{{showOverlay}}"
  closeOnOverlayClick="{{closeOnOverlayClick}}"
  preventScrollThrough="{{preventScrollThrough}}"
  overlayProps="{{overlayProps}}"
  zIndex="{{zIndex}}"
  placement="center"
  usingCustomNavbar="{{usingCustomNavbar}}"
  bind:visible-change="overlayClick"
>
  <view slot="content" class="{{classPrefix}} {{prefix}}-class">
    <slot name="top" />
    <view wx:if="{{closeBtn}}" class="{{classPrefix}}__close-btn" bind:tap="onClose">
      <template wx:if="{{_.isObject(closeBtn)}}" is="icon" data="{{ name: 'close', size: 22, ...closeBtn }}" />
      <t-icon wx:else name="close" size="22" />
    </view>
    <view class="{{classPrefix}}__content {{prefix}}-class-content">
      <view wx:if="{{title}}" class="{{classPrefix}}__header">{{title}}</view>
      <slot name="title" />
      <view wx:if="{{content}}" class="{{classPrefix}}__body">
        <text class="{{classPrefix}}__body-text">{{content}}</text>
      </view>
      <slot name="content" />
    </view>
    <slot name="middle" />
    <view
      class="{{_.cls(classPrefix + '__footer', [['column', buttonLayout === 'vertical'], ['full', buttonVariant == 'text' && actions.length == 0]])}}"
    >
      <block wx:if="{{actions}}">
        <block wx:for="{{actions}}" wx:key="index">
          <template
            is="button"
            data="{{block: true, type: 'action', extra: index, externalClass: prefix + '-class-action', class: this.getActionClass(classPrefix, buttonLayout), ...item }}"
          />
        </block>
      </block>
      <slot name="actions" />
      <block wx:if="{{_cancel}}">
        <template is="button" data="{{type: 'cancel', ..._cancel }}" />
      </block>
      <slot name="cancel-btn" />
      <block wx:if="{{_confirm}}">
        <template is="button" data="{{type: 'confirm', theme: 'primary', ..._confirm}}" />
      </block>
      <slot name="confirm-btn" />
    </view>
  </view>
</t-popup>