您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

微信小程序 modal组件详细介绍

2024/5/1 19:21:29发布39次查看
这篇文章主要介绍了微信小程序 modal组件详细介绍的相关资料,需要的朋友可以参考下
modal弹出框常用在提示一些信息比如:退出应用,清楚缓存,修改资料提交时一些提示等等。
常用属性:
wxml
<!--监听button点击事件--> <button bindtap="listenerbutton" type="primary">弹出modal</button> <!--弹出框--> <modal title="退出应用" hidden="{{hiddenmodal}}" confirm-text="再看看" cancel-text="退出" bindconfirm="listenerconfirm" bindcancel="listenercancel" > 您是否真的要退出应用 </modal>
js
page({ data:{ // text:"这是一个页面" hiddenmodal: true }, listenerbutton:function() { this.setdata({ hiddenmodal: !this.data.hiddenmodal }) }, listenerconfirm:function() { this.setdata({ hiddenmodal: true }) }, listenercancel:function() { this.setdata({ hiddenmodal: true }) }, onload:function(options){ // 页面初始化 options为页面跳转所带来的参数 }, onready:function(){ // 页面渲染完成 }, onshow:function(){ // 页面显示 }, onhide:function(){ // 页面隐藏 }, onunload:function(){ // 页面关闭 } })
更多微信小程序 modal组件详细介绍。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product