Commit 2b6e6d4c90a1e453ee7f4d4dd2a0c0522499a002
1 parent
55649319
fix #4786
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/components/cascader/cascader.vue
@@ -294,8 +294,11 @@ | @@ -294,8 +294,11 @@ | ||
294 | this.$refs.input.currentValue = ''; | 294 | this.$refs.input.currentValue = ''; |
295 | const oldVal = JSON.stringify(this.currentValue); | 295 | const oldVal = JSON.stringify(this.currentValue); |
296 | this.currentValue = item.value.split(','); | 296 | this.currentValue = item.value.split(','); |
297 | - this.emitValue(this.currentValue, oldVal); | ||
298 | - this.handleClose(); | 297 | + // use setTimeout for #4786, can not use nextTick, because @on-find-selected use nextTick |
298 | + setTimeout(() => { | ||
299 | + this.emitValue(this.currentValue, oldVal); | ||
300 | + this.handleClose(); | ||
301 | + }, 0); | ||
299 | }, | 302 | }, |
300 | handleFocus () { | 303 | handleFocus () { |
301 | this.$refs.input.focus(); | 304 | this.$refs.input.focus(); |