// 使用方法 import MessageBox from '@/utils/messageBox' // 简单提示 MessageBox.alert('这是一条提示信息', '提示') .then(() => { console.log('用户点击了确定') }) .catch(() => {}) // 确认提示 MessageBox.confirm('确定要执行该操作吗?', '请确认') .then(() => { console.log('用户确认了操作') }) .catch(() => { console.log('用户取消了操作') })
操作结果: {{ result }}