mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
<van-popup
|
|
show="{{ show }}"
|
|
position="bottom"
|
|
z-index="{{ zIndex }}"
|
|
overlay="{{ overlay }}"
|
|
custom-class="van-action-sheet"
|
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
|
bind:close="onClose"
|
|
>
|
|
<view wx:if="{{ title }}" class="van-hairline--bottom van-action-sheet__header">
|
|
{{ title }}
|
|
<van-icon
|
|
name="close"
|
|
custom-class="van-action-sheet__close"
|
|
bind:click="onClose"
|
|
/>
|
|
</view>
|
|
<button
|
|
wx:for="{{ actions }}"
|
|
wx:key="index"
|
|
open-type="{{ item.openType }}"
|
|
class="van-action-sheet__item van-hairline--top {{ item.disabled || item.loading ? 'van-action-sheet__item--disabled' : '' }} {{ item.className || '' }}"
|
|
data-index="{{ index }}"
|
|
bind:tap="onSelect"
|
|
>
|
|
<block wx:if="{{ !item.loading }}">
|
|
{{ item.name }}
|
|
<text wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</text>
|
|
</block>
|
|
<van-loading wx:else size="20px" />
|
|
</button>
|
|
<block wx:if="{{ cancelText }}">
|
|
<view class="van-action-sheet__blank" />
|
|
<view
|
|
class="van-action-sheet__cancel"
|
|
bind:tap="onCancel"
|
|
>
|
|
{{ cancelText }}
|
|
</view>
|
|
</block>
|
|
<slot />
|
|
</van-popup>
|