From 1a6249add338481e8506e037a4164530447dd803 Mon Sep 17 00:00:00 2001 From: liyunhang.fe Date: Sun, 9 Sep 2018 02:20:19 +0800 Subject: [PATCH] fix: cascader limitless refresh in hover trigger --- src/components/cascader/caspanel.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/cascader/caspanel.vue b/src/components/cascader/caspanel.vue index 5524683..327b5ef 100644 --- a/src/components/cascader/caspanel.vue +++ b/src/components/cascader/caspanel.vue @@ -77,8 +77,10 @@ // return value back recursion // 向上递归,设置临时选中值(并非真实选中) const backItem = this.getBaseItem(item); - this.tmpItem = backItem; - this.emitUpdate([backItem]); + if (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', { -- libgit2 0.21.4