ActionSheet组件
说明:小程序提供的wx.showActionSheet(Object object)不能满足多场景的需求,所以写了一个自定义的组件,可根据场景需求自定义内容。
路径:components/ActionSheet/ActionSheet
Attributes
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| showActionSheet | 显示下弹框 | Boolean | false |
| showCancel | 是否显示取消键 | Boolean | True |
使用方法:
<ActionSheet showActionSheet="{{showAction}}">
<!--
下面为自定义模块,可根据需求自己写,样式写在当前页面
-->
<view class="action-list">
<view class="action-item">
item1
</view>
<view class="action-item">
item2
</view>
<view class="action-item">
item3
</view>
</view>
</ActionSheet>
获取地址:https://github.com/JingDengLai/ZuJian/tree/master/components
本文介绍了一种针对微信小程序中wx.showActionSheet功能不足而创建的自定义ActionSheet组件。该组件允许根据场景需求定制内容,包括显示下拉框、是否显示取消键等属性。组件示例代码和使用方法给出,并提供了GitHub源码链接,便于开发者在项目中应用。
3万+

被折叠的 条评论
为什么被折叠?



