city-casereport/miniprogram_npm/tdesign-miniprogram/popup/popup.wxml
2023-12-06 14:22:42 +08:00

34 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<wxs src="./popup.wxs" module="popup" />
<wxs src="../common/utils.wxs" module="_" />
<view
wx:if="{{realVisible}}"
style="{{_._style([popup.getPopupStyles(zIndex), 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}}"
z-index="{{overlayProps && overlayProps.zIndex || 11000}}"
prevent-scroll-through="{{preventScrollThrough || (overlayProps ? !!overlayProps.preventScrollThrough : false)}}"
bind:tap="handleOverlayClick"
custom-style="{{overlayProps && overlayProps.style || ''}}"
/>