标签:mic rac his tap 表单 word int attr console
wx.showToast({
title: ‘成功‘,
icon: ‘success‘,
duration: 2000
})
2.模态弹窗 wx.showModal
wx.showModal({
title: ‘提示‘,
content: ‘这是一个模态弹窗‘,
success (res) {
if (res.confirm) {
console.log(‘用户点击确定‘)
} else if (res.cancel) {
console.log(‘用户点击取消‘)
}
}
})
3.操作菜单 wx.showActionSheet
wx.showActionSheet({ itemList: [‘A‘, ‘B‘, ‘C‘], success (res) { console.log(res.tapIndex) }, fail (res) { console.log(res.errMsg) } })
4.加载中 wx.showLoading
wx.showLoading({
title: ‘加载中‘,
})
setTimeout(function () {
wx.hideLoading()
}, 2000)
5.自定义modal(带有表单的弹出框)
<modal hidden="{{hiddenmodalput}}" title="请输入验证码" confirm-text="提交" cancel-text="重置" bindcancel="cancel" bindconfirm="confirm">
<input type=‘text‘placeholder="请输入内容" auto-focus/>
</modal>
标签:mic rac his tap 表单 word int attr console
原文地址:https://www.cnblogs.com/caoyuna/p/11478841.html