mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
<van-popup
|
|
show="{{ show }}"
|
|
position="bottom"
|
|
overlay="{{ overlay }}"
|
|
custom-class="van-action-sheet"
|
|
close-on-click-overlay="{{ closeOnClickOverlay }}"
|
|
bind:close="onClose"
|
|
>
|
|
<view wx:if="{{ title }}" class="van-hairline--top-bottom van-action-sheet__header">
|
|
<view>{{ title }}</view>
|
|
<van-icon custom-class="van-action-sheet__close" name="close" bind:click="onClose" />
|
|
</view>
|
|
<view wx:else class="van-hairline--bottom">
|
|
<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 }}">
|
|
<view class="van-action-sheet__name">{{ item.name }}</view>
|
|
<view class="van-action-sheet__subname" wx:if="{{ item.subname }}">{{ item.subname }}</view>
|
|
</block>
|
|
<van-loading wx:else custom-class="van-action-sheet__loading" size="20px" />
|
|
</button>
|
|
</view>
|
|
<view
|
|
wx:if="{{ cancelText }}"
|
|
class="van-action-sheet__cancel van-hairline--top"
|
|
bind:tap="onCancel"
|
|
>
|
|
{{ cancelText }}
|
|
</view>
|
|
<view wx:else class="van-action-sheet__content">
|
|
<slot />
|
|
</view>
|
|
</van-popup>
|