修复搜索框在某些情况下输入内容后搜索时会自动清空的问题(#1472)
This commit is contained in:
@@ -162,10 +162,18 @@ export default {
|
||||
})
|
||||
},
|
||||
handleKeyDown() {
|
||||
this.selectIndex = this.selectIndex + 1 < this.list.length ? this.selectIndex + 1 : 0
|
||||
if (this.list.length) {
|
||||
this.selectIndex = this.selectIndex + 1 < this.list.length ? this.selectIndex + 1 : 0
|
||||
} else if (this.selectIndex > -1) {
|
||||
this.selectIndex = -1
|
||||
}
|
||||
},
|
||||
handleKeyUp() {
|
||||
this.selectIndex = this.selectIndex - 1 < -1 ? this.list.length - 1 : this.selectIndex - 1
|
||||
if (this.list.length) {
|
||||
this.selectIndex = this.selectIndex - 1 < -1 ? this.list.length - 1 : this.selectIndex - 1
|
||||
} else if (this.selectIndex > -1) {
|
||||
this.selectIndex = -1
|
||||
}
|
||||
},
|
||||
handleContextMenu() {
|
||||
let str = clipboardReadText()
|
||||
|
||||
Reference in New Issue
Block a user