Commit 1a6249add338481e8506e037a4164530447dd803

Authored by liyunhang.fe
1 parent f356c492

fix: cascader limitless refresh in hover trigger

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
src/components/cascader/caspanel.vue
... ... @@ -77,8 +77,10 @@
77 77  
78 78 // return value back recursion // 向上递归,设置临时选中值(并非真实选中)
79 79 const backItem = this.getBaseItem(item);
80   - this.tmpItem = backItem;
81   - this.emitUpdate([backItem]);
  80 + if (backItem.label !== this.tmpItem.label || backItem.value !== this.tmpItem.value) {
  81 + this.tmpItem = backItem;
  82 + this.emitUpdate([backItem]);
  83 + }
82 84 if (item.children && item.children.length){
83 85 this.sublist = item.children;
84 86 this.dispatch('Cascader', 'on-result-change', {
... ...