小程序 顯示對話框 確定-取消


詳細參數見小程序API:https://developers.weixin.qq.com/miniprogram/dev/api/wx.showModal.html

        wx.showModal({
              title: '確定關閉嗎',
              content: '還沒有保存確定關閉嗎',
              success(res) {
                if (res.confirm) {
            console.log('用戶點確定了')

                } else if (res.cancel) {
                  console.log('用戶點擊取消')
                }
           }  

總結: 類似相關功能都在小程序 api 的  界面 -->  交互  大目錄下


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM