Element-UI在Dialog关闭Dialog的方法

this.$parent.$emit('update:visible', false);

或者通过另一篇文章Vue组件查找的findComponentUpward

const dialog = findComponentUpward(this, "ElDialog");
if(dialog) {
    dialog.$emit('update:visible', false);
}
posted @ 2022-03-24 17:44  哦哈呦  阅读(400)  评论(0)    收藏  举报