feat: 新增组件多选和右键成组按钮

This commit is contained in:
奔跑的面条
2022-06-28 21:57:29 +08:00
parent 3537427846
commit 3a066fc9bb
9 changed files with 109 additions and 63 deletions
+5 -5
View File
@@ -77,14 +77,14 @@ const macKeyList: Array<string> = [
// 处理键盘记录
const keyRecordHandle = () => {
document.onkeydown = throttle((e: KeyboardEvent) => {
document.onkeydown = (e: KeyboardEvent) => {
if(window.$KeyboardActive) window.$KeyboardActive.add(e.key.toLocaleLowerCase())
else window.$KeyboardActive = new Set([e.key])
}, 200)
else window.$KeyboardActive = new Set([e.key.toLocaleLowerCase()])
}
document.onkeyup = throttle((e: KeyboardEvent) => {
document.onkeyup = (e: KeyboardEvent) => {
if(window.$KeyboardActive) window.$KeyboardActive.delete(e.key.toLocaleLowerCase())
}, 200)
}
}
// 初始化监听事件