


Detailed introduction of WeChat applet action-sheet component
This article mainly introduces the relevant information about the detailed introduction of the action-sheet component of the WeChat applet. Friends in need can refer to it
The action-sheet component is from the bottom The optional menu items pop up, which is probably added based on the design of IOS. action-sheet has two sub-components, action-sheet-item is for each option, action-sheet-cancel cancels the option, and there is a interval, and clicking will trigger the action-sheet listening event
Main attributes:
##wxml
<!--触发action-sheet事件--> <button type="primary" bindtap="listenerButton">弹出ActionSheet</button> <!--默认action-sheet为隐藏,由button触发--> <action-sheet hidden="{{actionSheetHidden}}" bindchange="listenerActionSheet" > <block wx:for-items="{{actionSheetItems}}" > <action-sheet-item >{{item}}</action-sheet-item> </block> <!--自动隐藏action-sheet--> <action-sheet-cancel>取消</action-sheet-cancel> </action-sheet>
js
Page({ data:{ // text:"这是一个页面" actionSheetHidden: true, actionSheetItems: ['item1', 'item2', 'item3'] }, listenerButton: function() { this.setData({ //取反 actionSheetHidden: !this.data.actionSheetHidden }); }, listenerActionSheet:function() { this.setData({ actionSheetHidden: !this.data.actionSheetHidden }) }, onLoad:function(options){ // 页面初始化 options为页面跳转所带来的参数 }, onReady:function(){ // 页面渲染完成 }, onShow:function(){ // 页面显示 }, onHide:function(){ // 页面隐藏 }, onUnload:function(){ // 页面关闭 } })

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
