由于 #4472 的 pr,导致了 #5021#4998 的bug
This commit is contained in:
梁灏 2018-12-20 15:33:57 +08:00
parent 5be1b3ee91
commit 55649319b5

View file

@ -77,14 +77,16 @@
// return value back recursion //
const backItem = this.getBaseItem(item);
// #5021
if (this.changeOnSelect) {
this.tmpItem = backItem;
this.emitUpdate([backItem]);
} else if (backItem.label !== this.tmpItem.label || backItem.value !== this.tmpItem.value) {
// #5021 for this.changeOnSelect if #4472
if (
this.changeOnSelect ||
(backItem.label !== this.tmpItem.label || backItem.value !== this.tmpItem.value) ||
(backItem.label === this.tmpItem.label && backItem.value === this.tmpItem.value)
) {
this.tmpItem = backItem;
this.emitUpdate([backItem]);
}
if (item.children && item.children.length){
this.sublist = item.children;
this.dispatch('Cascader', 'on-result-change', {