


Detailed explanation and example code of WeChat mini program modal
This article mainly introduces the detailed explanation and example code of the WeChat Mini Program modal. Friends who need it can refer to the
WeChat Mini Program modal
dialogue Pop-up window
Type | Default value | Description | |
---|---|---|---|
String | Title | ||
Boolean | false | Whether to hide the entire pop-up window | |
Boolean | false | Whether to hide the cancel button | |
String | Confirm | confirm button text | |
String | Cancel | cancel button text | |
EventHandle | Callback triggered by click confirmation | ||
EventHandle | Click to cancel and the callback triggered by the mask |
<modal title="标题" confirm-text="confirm" cancel-text="cancel" hidden="{{modalHidden}}" bindconfirm="modalChange" bindcancel="modalChange"> 这是对话框的内容。 </modal> <modal class="modal" hidden="{{modalHidden2}}" no-cancel bindconfirm="modalChange2"> <view> 没有标题没有蒙层没有确定的modal </view> <view> 内容可以插入节点 </view> </modal> <view class="btn-area"> <button type="default" bindtap="modalTap">点击弹出modal</button> <button type="default" bindtap="modalTap2">点击弹出modal2</button> </view>
Page({ data: { modalHidden: true, modalHidden2: true }, modalTap: function(e) { this.setData({ modalHidden: false }) }, modalChange: function(e) { this.setData({ modalHidden: true }) }, modalTap2: function(e) { this.setData({ modalHidden2: false }) }, modalChange2: function(e) { this.setData({ modalHidden2: true }) }, })
#Thank you for reading, I hope it can help everyone, thank you for your support of this site!
For more WeChat applet modal details and example code related articles, please pay attention to 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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1
Powerful PHP integrated development environment

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

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