mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
85 lines
2.0 KiB
Plaintext
85 lines
2.0 KiB
Plaintext
<van-button class="van-button" bind:buttonclick="togglePopup">
|
|
弹出popup
|
|
</van-button>
|
|
<van-button class="van-button" bind:buttonclick="toggleTopPopup">
|
|
从顶部弹出popup
|
|
</van-button>
|
|
<van-button class="van-button" bind:buttonclick="toggleBottomPopup">
|
|
从底部弹出popup
|
|
</van-button>
|
|
<van-button class="van-button" bind:buttonclick="toggleLeftPopup">
|
|
从左边弹出popup
|
|
</van-button>
|
|
<van-button class="van-button" bind:buttonclick="toggleRightPopup">
|
|
从右边弹出popup
|
|
</van-button>
|
|
|
|
<!-- 中间弹出框 -->
|
|
<van-popup
|
|
show="{{ showPopup }}"
|
|
bindclose="togglePopup"
|
|
>
|
|
<view class="pop-example__container">
|
|
<view class="van-buttons">
|
|
<button class="van-button" bindtap="togglePopup">
|
|
关闭 popup
|
|
</button>
|
|
</view>
|
|
</view>
|
|
</van-popup>
|
|
|
|
<!-- 左侧弹出框 -->
|
|
<van-popup
|
|
show="{{ showLeftPopup }}"
|
|
type="left"
|
|
bindclose="toggleLeftPopup"
|
|
>
|
|
<view class="pop-example__container pop-example__container--left">
|
|
<view class="van-buttons">
|
|
<button class="van-button" bindtap="toggleLeftPopup">
|
|
关闭 popup
|
|
</button>
|
|
</view>
|
|
</view>
|
|
</van-popup>
|
|
|
|
<!-- 右侧弹出框 -->
|
|
<van-popup
|
|
show="{{ showRightPopup }}"
|
|
type="right"
|
|
bindclose="toggleRightPopup"
|
|
>
|
|
<view class="pop-example__container pop-example__container--right">
|
|
<view class="van-buttons">
|
|
<button class="van-button" catchtap="toggleRightPopup">
|
|
关闭 popup
|
|
</button>
|
|
</view>
|
|
</view>
|
|
</van-popup>
|
|
|
|
<!-- 顶部弹出框 -->
|
|
<van-popup
|
|
show="{{ showTopPopup }}"
|
|
overlay="{{ false }}"
|
|
type="top"
|
|
bindclose="toggleTopPopup"
|
|
>
|
|
<view class="pop-example--top">内容</view>
|
|
</van-popup>
|
|
|
|
<!-- 底部弹出框 -->
|
|
<van-popup
|
|
show="{{ showBottomPopup }}"
|
|
type="bottom"
|
|
bindclose="toggleBottomPopup"
|
|
>
|
|
<view class="pop-example__container pop-example__container--bottom">
|
|
<view class="van-buttons">
|
|
<button class="van-button" catchtap="toggleBottomPopup">
|
|
关闭 popup
|
|
</button>
|
|
</view>
|
|
</view>
|
|
</van-popup>
|