Commit 17d9922b0833059e4124b1c08a2d05a9a9ed4c43
Committed by
GitHub
Merge pull request #3486 from Superman379/patch-1
修复autoComplete的on-change事件的bug
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
src/components/auto-complete/auto-complete.vue
... | ... | @@ -124,7 +124,9 @@ |
124 | 124 | }, |
125 | 125 | watch: { |
126 | 126 | value (val) { |
127 | - this.disableEmitChange = true; | |
127 | + if(this.currentValue !== val){ | |
128 | + this.disableEmitChange = true; | |
129 | + } | |
128 | 130 | this.currentValue = val; |
129 | 131 | }, |
130 | 132 | currentValue (val) { |
... | ... | @@ -161,4 +163,4 @@ |
161 | 163 | } |
162 | 164 | } |
163 | 165 | }; |
164 | -</script> | |
165 | 166 | \ No newline at end of file |
167 | +</script> | ... | ... |