From 2b6e6d4c90a1e453ee7f4d4dd2a0c0522499a002 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Thu, 20 Dec 2018 16:23:55 +0800 Subject: [PATCH] fix #4786 --- src/components/cascader/cascader.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index 3b2f917..97b084b 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -294,8 +294,11 @@ this.$refs.input.currentValue = ''; const oldVal = JSON.stringify(this.currentValue); this.currentValue = item.value.split(','); - this.emitValue(this.currentValue, oldVal); - this.handleClose(); + // use setTimeout for #4786, can not use nextTick, because @on-find-selected use nextTick + setTimeout(() => { + this.emitValue(this.currentValue, oldVal); + this.handleClose(); + }, 0); }, handleFocus () { this.$refs.input.focus(); -- libgit2 0.21.4