Files
WXProgram/miniprogram/components/bottom-modal/bottom-modal.wxml

19 lines
657 B
Plaintext
Raw Normal View History

2025-10-16 21:32:16 +08:00
<view wx:if="{{visible}}" class="modal-overlay bottom-modal" bindtap="onHideModal">
<view
class="modal-container {{animationClass}} {{modalContentClass}}"
style="height: {{containerHeight}}; transform: translateY({{initialTranslate}});"
bindtouchstart="onTouchStart"
bindtouchmove="onTouchMove"
bindtouchend="onTouchEnd"
catchtap="preventTouchMove"
>
<!-- 拖动指示器 -->
<view class="modal-handle"></view>
<!-- 内容区域使用slot让父组件可以自定义内容 -->
<slot></slot>
<!-- 关闭按钮 -->
<view class="modal-close" bindtap="onHideModal">×</view>
</view>
</view>