fix: 空格热键导致ctrl 无法多选组件

This commit is contained in:
jeo young 2022-12-16 23:27:02 +08:00
parent f64cd4dcf1
commit 117b9d0114

View File

@ -281,12 +281,12 @@ export const setKeyboardDressShow = (keyCode?: number) => {
const dom = document.getElementById('keyboard-dress-show')
if (!dom) return
if (!keyCode) {
window.onKeySpacePressHold?.(false)
if (keyCode == 32) window.onKeySpacePressHold?.(false)
dom.innerText = ''
return
}
if (keyCode && code.has(keyCode)) {
window.onKeySpacePressHold?.(true)
if (keyCode == 32) window.onKeySpacePressHold?.(true)
dom.innerText = `按下了「${code.get(keyCode)}」键`
}
}