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 @   哦哈呦  阅读(381)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示