Commit 5be1b3ee9164321233c678d80ba99c018b34bacc
1 parent
4cc72ddb
fix #5021
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/components/cascader/caspanel.vue
| @@ -77,7 +77,11 @@ | @@ -77,7 +77,11 @@ | ||
| 77 | 77 | ||
| 78 | // return value back recursion // 向上递归,设置临时选中值(并非真实选中) | 78 | // return value back recursion // 向上递归,设置临时选中值(并非真实选中) |
| 79 | const backItem = this.getBaseItem(item); | 79 | const backItem = this.getBaseItem(item); |
| 80 | - if (backItem.label !== this.tmpItem.label || backItem.value !== this.tmpItem.value) { | 80 | + // #5021 |
| 81 | + if (this.changeOnSelect) { | ||
| 82 | + this.tmpItem = backItem; | ||
| 83 | + this.emitUpdate([backItem]); | ||
| 84 | + } else if (backItem.label !== this.tmpItem.label || backItem.value !== this.tmpItem.value) { | ||
| 81 | this.tmpItem = backItem; | 85 | this.tmpItem = backItem; |
| 82 | this.emitUpdate([backItem]); | 86 | this.emitUpdate([backItem]); |
| 83 | } | 87 | } |