this.$parent.$emit('update:visible', false);
或者通过另一篇文章Vue组件查找的findComponentUpward
const dialog = findComponentUpward(this, "ElDialog");
if(dialog) {
dialog.$emit('update:visible', false);
}
this.$parent.$emit('update:visible', false);
或者通过另一篇文章Vue组件查找的findComponentUpward
const dialog = findComponentUpward(this, "ElDialog");
if(dialog) {
dialog.$emit('update:visible', false);
}