1、 引入组件,并编写代码

const h = this.$createElement;
this.$msgbox({
title: '绑定邮箱',
message: h('email'),
showCancelButton: false,
showConfirmButton: false,
}).then(value => {
console.log(value,'ggg')
});
2、 在子组件email中,确定和取消方法里加入关闭弹窗的代码
this.$refs.bindForm.$parent.$parent.doClose()
本文介绍如何在Vue项目中使用自定义弹窗组件进行交互,包括在父组件中调用子组件并处理返回值,以及在子组件内实现确定和取消操作时关闭弹窗的方法。
3432

被折叠的 条评论
为什么被折叠?



