mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增组件多选和右键成组按钮
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化监听事件
|
||||
|
||||
Reference in New Issue
Block a user