wx.showModal delete(){ wx.showModal({ title: '', content: '是否確認刪除', success(res) { if (res.confirm) { console.log('用戶點擊確定') } else if (res.cancel) { console.log('用戶點擊取消') } } }) } |
提示你想提示的信息
wx.showToast({ title: '成功', icon: 'success', duration: 2000 }) |
注意
wx.showLoading 和 wx.showToast 同時只能顯示一個
wx.showToast 應與 wx.hideToast 配對使用
wx.showLoading
wx.showLoading({ title: '加載中', }) setTimeout(function () { wx.hideLoading() }, 2000) |
wx.showActionSheet({ itemList: ['A', 'B', 'C'], success: function(res) { console.log(res.tapIndex) }, fail: function(res) { console.log(res.errMsg) } |