沙盘演示系统应用的微信小程序
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
<wxs src="./popup.wxs" module="popup" />
<wxs src="../common/utils.wxs" module="_" />
 
<view
  wx:if="{{realVisible}}"
  style="{{_._style([popup.getPopupStyles(zIndex, distanceTop, placement), style, customStyle])}}"
  class="{{_.cls(classPrefix, [placement])}} {{transitionClass}} class {{prefix}}-class"
  bind:transitionend="onTransitionEnd"
>
  <!-- 暂时移除:aria-role="dialog" aria-modal="{{ true }}",关联:https://github.com/Tencent/tdesign-miniprogram/issues/2142 -->
  <view
    data-prevention="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}"
    bind:touchmove="{{popup.onContentTouchMove}}"
    class="{{classPrefix}}__content {{prefix}}-class-content"
  >
    <slot name="content" />
    <slot />
    <view class="{{classPrefix}}__close" bind:tap="handleClose">
      <t-icon name="close" wx:if="{{closeBtn}}" size="64rpx" />
      <slot name="close-btn" class="{{classPrefix}}-slot" />
    </view>
  </view>
</view>
 
<t-overlay
  id="popup-overlay"
  wx:if="{{showOverlay}}"
  visible="{{visible}}"
  usingCustomNavbar="{{usingCustomNavbar}}"
  z-index="{{overlayProps && overlayProps.zIndex || 11000}}"
  duration="{{overlayProps && overlayProps.duration || 300}}"
  background-color="{{overlayProps && overlayProps.backgroundColor || ''}}"
  prevent-scroll-through="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}"
  bind:tap="handleOverlayClick"
  custom-style="{{overlayProps && overlayProps.style || ''}}"
/>