fix: 修正了Alt导致的错误聚焦

This commit is contained in:
ZiuChen 2022-09-09 11:13:20 +08:00
parent 55fb304fa3
commit e4122cfe15

View File

@ -253,6 +253,7 @@ onMounted(() => {
const isArrow = key === 'ArrowDown' || key === 'ArrowUp'
const isEnter = key === 'Enter'
const isShift = key === 'Shift'
const isAlt = key === 'Alt'
if (isTab) {
const tabTypes = tabs.map((item) => item.type)
const index = tabTypes.indexOf(activeTab.value)
@ -276,9 +277,10 @@ onMounted(() => {
}
} else if (isArrow || isEnter) {
e.preventDefault()
} else if (isShift || ctrlKey || metaKey) {
} else if (isShift || ctrlKey || metaKey || isAlt) {
// Shift:
// Ctrl: utools
// Alt:
} else {
window.focus() //
}