Vant2 Dialog组件官方文档:https://youzan.github.io/vant/v2/#/zh-CN/dialog
消息提示
<script>Dialog.alert({title: '标题',message: '弹窗内容',confirmButtonText: '确认按钮文案',cancelButtonText: '取消按钮文案',theme: 'round-button',}) .then(() => {// 此处触发 “确认按钮” 回调事件// todo}).catch(() => {// 此处触发 “取消按钮” 回调事件// todo});</script>
消息确认
Dialog.confirm({title: '标题',message: '弹窗内容',}).then(() => {// 此处触发 “确认按钮” 回调事件// todo}).catch(() => {// 此处触发 “取消按钮” 回调事件// todo});