修改绑定的键
This commit is contained in:
@@ -80,7 +80,7 @@ export default {
|
||||
isShowListAddMultiple: false,
|
||||
keyEvent: {
|
||||
isShiftDown: false,
|
||||
isAltDown: false,
|
||||
isModDown: false,
|
||||
isADown: false,
|
||||
},
|
||||
}
|
||||
@@ -171,16 +171,16 @@ export default {
|
||||
listenEvent() {
|
||||
window.eventHub.$on('shift_down', this.handle_shift_down)
|
||||
window.eventHub.$on('shift_up', this.handle_shift_up)
|
||||
window.eventHub.$on('alt_down', this.handle_alt_down)
|
||||
window.eventHub.$on('alt_up', this.handle_alt_up)
|
||||
window.eventHub.$on('mod_down', this.handle_mod_down)
|
||||
window.eventHub.$on('mod_up', this.handle_mod_up)
|
||||
window.eventHub.$on('mod+a_down', this.handle_mod_a_down)
|
||||
window.eventHub.$on('mod+a_up', this.handle_mod_a_up)
|
||||
},
|
||||
unlistenEvent() {
|
||||
window.eventHub.$off('shift_down', this.handle_shift_down)
|
||||
window.eventHub.$off('shift_up', this.handle_shift_up)
|
||||
window.eventHub.$off('alt_down', this.handle_alt_down)
|
||||
window.eventHub.$off('alt_up', this.handle_alt_up)
|
||||
window.eventHub.$off('mod_down', this.handle_mod_down)
|
||||
window.eventHub.$off('mod_up', this.handle_mod_up)
|
||||
window.eventHub.$off('mod+a_down', this.handle_mod_a_down)
|
||||
window.eventHub.$off('mod+a_up', this.handle_mod_a_up)
|
||||
},
|
||||
@@ -190,11 +190,11 @@ export default {
|
||||
handle_shift_up() {
|
||||
if (this.keyEvent.isShiftDown) this.keyEvent.isShiftDown = false
|
||||
},
|
||||
handle_alt_down() {
|
||||
if (!this.keyEvent.isAltDown) this.keyEvent.isAltDown = true
|
||||
handle_mod_down() {
|
||||
if (!this.keyEvent.isModDown) this.keyEvent.isModDown = true
|
||||
},
|
||||
handle_alt_up() {
|
||||
if (this.keyEvent.isAltDown) this.keyEvent.isAltDown = false
|
||||
handle_mod_up() {
|
||||
if (this.keyEvent.isModDown) this.keyEvent.isModDown = false
|
||||
},
|
||||
handle_mod_a_down() {
|
||||
if (!this.keyEvent.isADown) {
|
||||
@@ -276,7 +276,7 @@ export default {
|
||||
event.currentTarget.classList.add('active')
|
||||
this.selectdData.push(this.listInfo.list[clickIndex])
|
||||
}
|
||||
} else if (this.keyEvent.isAltDown) {
|
||||
} else if (this.keyEvent.isModDown) {
|
||||
let item = this.listInfo.list[clickIndex]
|
||||
let index = this.selectdData.indexOf(item)
|
||||
if (index < 0) {
|
||||
|
||||
Reference in New Issue
Block a user