parent
5be1b3ee91
commit
55649319b5
1 changed files with 7 additions and 5 deletions
|
@ -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', {
|
||||
|
|
Loading…
Add table
Reference in a new issue