mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
<view class="van-actionsheet {{ show ? 'van-actionsheet--show' : '' }}">
|
|
<view
|
|
class="mask-class van-actionsheet__mask"
|
|
bindtap="onMaskClick"
|
|
></view>
|
|
<view class="container-class van-actionsheet__container">
|
|
<!-- 选项按钮 -->
|
|
<van-button
|
|
wx:for="{{ actions }}"
|
|
wx:key="{{ index }}-{{ item.name }}"
|
|
bind:buttonclick="handleBtnClick"
|
|
data-index="{{ index }}"
|
|
open-type="{{ item.openType }}"
|
|
custom-class="van-actionsheet__button"
|
|
loading="{{ item.loading }}"
|
|
>
|
|
<!-- 自定义组件控制 slot 样式有问题,故在 slot 容器上传入 loading 信息 -->
|
|
<view class="van-actionsheet__button-content {{ item.loading ? 'van-actionsheet__button--loading' : '' }}">
|
|
<view class="van-actionsheet__name">{{ item.name }}</view>
|
|
<view
|
|
wx:if="{{ item.subname }}"
|
|
class="van-actionsheet__subname">
|
|
{{ item.subname }}
|
|
</view>
|
|
</view>
|
|
</van-button>
|
|
|
|
<!-- 关闭按钮 -->
|
|
<view
|
|
wx:if="{{ cancelText }}"
|
|
class="van-actionsheet__footer"
|
|
>
|
|
<van-button
|
|
custom-class="van-actionsheet__button"
|
|
catchtap="cancelClick"
|
|
>{{ cancelText }}</van-button>
|
|
</view>
|
|
</view>
|
|
</view>
|