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