【文件属性】:
文件名称:Charlotte微信小程序开发(三)--交互反馈
文件大小:32KB
文件格式:PDF
更新时间:2021-03-29 18:04:28
Charlotte,微信,小,程序开发,(,三,),--,交
1.wx.showToast(OBJECT) 显示消息提示框
//封装在app.js中
showToast:function(msg){
wx.showToast({
title: msg.title,
icon: msg.icon,
duration: 2000
})
}
//在其他页面调用
let app=getApp();
let loading={
title:'加载中',
icon:'loading'
}
let success={
title:'创建成功',
icon:'success'
}
app.showT