微信小程序之彈框提示信息
一、模態窗口
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 配對使用
三、顯示 loading 提示框
wx.showLoading
wx.showLoading({ title: '加載中', }) setTimeout(function () { wx.hideLoading() }, 2000)
四、 wx.showActionSheet(OBJECT)
wx.showActionSheet({ itemList: ['A', 'B', 'C'], success: function(res) { console.log(res.tapIndex) }, fail: function(res) { console.log(res.errMsg) }
如果您的問題還未解決可以聯系站長付費協助。

有問題可以加入技術QQ群一起交流學習
本站vip會員 請加入無憂模板網 VIP群(50604020) PS:加入時備注用戶名或昵稱
普通注冊會員或訪客 請加入無憂模板網 技術交流群(50604130)
客服微信號:15898888535
聲明:本站所有文章資源內容,如無特殊說明或標注,均為采集網絡資源。如若內容侵犯了原著者的合法權益,可聯系站長刪除。