


WeChat applet component: action-sheet displays operation menu interpretation and analysis
action-sheet Displays the component description of the action menu:
Display action menu
action-sheetDisplay action menuSample code run The effect is as follows:
#The following is the WXML code:
# #<button>弹出ActionSheet</button>
The following is the JS code:
##actionSheetTap: function () {
var itemList= ['A', 'B', 'C']
wx.showActionSheet({
itemList:itemList,
success: function (res) {
if (!res.cancel) {
console.log(itemList[res.tapIndex])
}
}
})
}
action-sheet displays the main properties of the action menu:
OBJECT parameter description:Type |
Required |
Description |
itemList |
is the text array of the | button. The maximum length of the array is 6 | itemColor | |
No | The text color of the button, the default is "#000000" | ##success | Function |
The interface calls the callback function successfully, please see the return parameter description for details | fail | Function | |
Callback function for interface call failure | complete | Function | |
Callback function for end of interface call Function (executed successfully or failed) |
Type | Description | cancel | Boolean
tapIndex | Number | |
The above is the detailed content of WeChat applet component: action-sheet displays operation menu interpretation and analysis. For more information, please follow other related articles on the PHP Chinese website!

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools