Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 28c2468

Browse files
committed
修复change事件冲突问题
1 parent 766495f commit 28c2468

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/SelectPicker.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,20 @@ export default {
9696
}
9797
},
9898
99+
blur: event => {
100+
101+
},
102+
99103
input: event => {
100104
const value = event.target.value
101105
102106
this._dropdownInput(value)
103107
},
104108
109+
change: event => {
110+
this.$emit('change', {data: this.chooseData, text: this.value})
111+
},
112+
105113
keydown: event => {
106114
switch (event.keyCode) {
107115
case 13: // enter
@@ -240,10 +248,6 @@ export default {
240248
this.activeIndex = -1
241249
this.showDropdown()
242250
this.$emit('input', value)
243-
console.log(this.value, value)
244-
// if (this.value !== value) {
245-
// this.$emit('change', {data: this.chooseData, text: value})
246-
// }
247251
},
248252
249253
// 初始化

0 commit comments

Comments
 (0)