mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-21 07:50:30 +00:00
feat(manage): 优化快捷键事件处理
This commit is contained in:
parent
22de7de87c
commit
ff87de9f44
@ -1321,7 +1321,20 @@ export default {
|
||||
},
|
||||
|
||||
shortcutEvent(e) {
|
||||
if (e.metaKey || e.ctrlKey) {
|
||||
if (!(e.metaKey || e.ctrlKey) || e.shiftKey) return;
|
||||
|
||||
// Ctrl/Cmd + Alt 组合
|
||||
if (e.altKey) {
|
||||
switch (e.keyCode) {
|
||||
case 76: // L - 下载内容
|
||||
e.preventDefault();
|
||||
this.settingRoute('download')
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Ctrl/Cmd 组合(无 Alt/Shift)
|
||||
switch (e.keyCode) {
|
||||
case 66: // B - 新建项目
|
||||
e.preventDefault();
|
||||
@ -1340,13 +1353,6 @@ export default {
|
||||
this.onAddMenu('task')
|
||||
break;
|
||||
|
||||
case 76: // L - 下载内容(+ alt)
|
||||
if (e.altKey) {
|
||||
e.preventDefault();
|
||||
this.settingRoute('download')
|
||||
}
|
||||
break;
|
||||
|
||||
case 85: // U - 创建群组
|
||||
this.onCreateGroup([this.userId])
|
||||
break;
|
||||
@ -1374,7 +1380,6 @@ export default {
|
||||
this.toggleRoute('setting')
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onProjectSortEnd() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user