fix: 修改快捷键功能与提示

This commit is contained in:
MTrun
2022-03-22 10:33:40 +08:00
parent 9ca618c3c5
commit 75291a9feb
3 changed files with 17 additions and 12 deletions
+9 -6
View File
@@ -21,19 +21,22 @@ const KeyboardHandle = (e: KeyboardEvent) => {
const key = e.key.toLowerCase()
// 删除
if (key === keyboardValue.delete) {
chartEditStore.removeComponentList()
return
}
// if (key === keyboardValue.delete) {
// chartEditStore.removeComponentList()
// return
// }
// 前进
if (e.ctrlKey && e.shiftKey && key == keyboardValue.back) {
if (e.altKey && e.shiftKey && key == keyboardValue.back) {
chartEditStore.setForward()
return
}
if (e.ctrlKey) {
if (e.altKey) {
switch (key) {
// 删除
case keyboardValue.delete: chartEditStore.removeComponentList()
break;
// 复制
case keyboardValue.copy: chartEditStore.setCopy()
break;