diff --git a/examples/routers/cascader.vue b/examples/routers/cascader.vue index 4cf2b22..6f35c63 100644 --- a/examples/routers/cascader.vue +++ b/examples/routers/cascader.vue @@ -1,11 +1,19 @@ diff --git a/src/components/cascader/cascader.vue b/src/components/cascader/cascader.vue index 1d24fd1..ae2810a 100644 --- a/src/components/cascader/cascader.vue +++ b/src/components/cascader/cascader.vue @@ -258,8 +258,9 @@ updateResult (result) { this.tmpSelected = result; }, - updateSelected (init = false) { - if (!this.changeOnSelect || init) { + updateSelected (init = false, changeOnSelectDataChange = false) { + // #2793 changeOnSelectDataChange used for changeOnSelect when data changed and set value + if (!this.changeOnSelect || init || changeOnSelectDataChange) { this.broadcast('Caspanel', 'on-find-selected', { value: this.currentValue }); @@ -386,7 +387,7 @@ if (validDataStr !== this.validDataStr) { this.validDataStr = validDataStr; if (!this.isLoadedChildren) { - this.$nextTick(() => this.updateSelected()); + this.$nextTick(() => this.updateSelected(false, this.changeOnSelect)); } this.isLoadedChildren = false; } -- libgit2 0.21.4