优化代码逻辑,修复潜在播放问题

This commit is contained in:
lyswhut
2023-01-14 16:03:56 +08:00
parent d3c8f16aed
commit 850a429243
35 changed files with 85 additions and 342 deletions
@@ -137,10 +137,10 @@ export default {
},
handle_key_mod_down() {
console.log('handle_key_mod_down')
if (!this.isModDown) this.isModDown = true
this.isModDown ||= true
},
handle_key_mod_up() {
if (this.isModDown) this.isModDown = false
this.isModDown &&= false
},
handle_key_mod_f_down() {
if (this.visible) this.$refs.dom_input.focus()
+4 -4
View File
@@ -10,16 +10,16 @@ const useKeyEvent = ({ handleSelectAllData }) => {
}
const handle_key_shift_down = () => {
if (!keyEvent.isShiftDown) keyEvent.isShiftDown = true
keyEvent.isShiftDown ||= true
}
const handle_key_shift_up = () => {
if (keyEvent.isShiftDown) keyEvent.isShiftDown = false
keyEvent.isShiftDown &&= false
}
const handle_key_mod_down = () => {
if (!keyEvent.isModDown) keyEvent.isModDown = true
keyEvent.isModDown ||= true
}
const handle_key_mod_up = () => {
if (keyEvent.isModDown) keyEvent.isModDown = false
keyEvent.isModDown &&= false
}
const handle_key_mod_a_down = ({ event }) => {
if (event.target.tagName == 'INPUT') return