1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > Vant 2 调用Dialog组件确认与取消按钮的回调事件

Vant 2 调用Dialog组件确认与取消按钮的回调事件

时间:2022-05-30 14:42:45

相关推荐

Vant 2 调用Dialog组件确认与取消按钮的回调事件

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});

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。