uniapp提示弹窗

📅 2026/7/26 23:29:04 👁️ 阅读次数 📝 编程学习
uniapp提示弹窗

1.带有确认按钮的

uni.showModal({ title: '提示', content: '提示内容', showCancel: false, // 只保留确认按钮 success: (res) => { if (res.confirm) { //确认后具体操作 } } })

2.弹出显示一下

(1)

uni.showToast({ title: '提示内容', icon: 'none' });

(2)

uni.$u.toast('超过限定时间,禁止操作')