From 90d7060a22c183ef0d1c61ed2aef8db794d453b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Tue, 20 Dec 2022 15:16:25 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=96=B0=E5=A2=9E=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/enums/editPageEnum.ts | 3 +- .../EditShortcutKey/ShortcutKeyModal.vue | 28 +++++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/enums/editPageEnum.ts b/src/enums/editPageEnum.ts index 4b26802d..07d51e70 100644 --- a/src/enums/editPageEnum.ts +++ b/src/enums/editPageEnum.ts @@ -79,5 +79,6 @@ export enum MacKeyboard { ALT = '⌥', CTRL_SOURCE_KEY = '⌘', SHIFT_SOURCE_KEY = '⇧', - ALT_SOURCE_KEY = '⌥' + ALT_SOURCE_KEY = '⌥', + SPACE = 'Space' } diff --git a/src/views/chart/ContentEdit/components/EditShortcutKey/ShortcutKeyModal.vue b/src/views/chart/ContentEdit/components/EditShortcutKey/ShortcutKeyModal.vue index 24af3ca7..17dd3ecc 100644 --- a/src/views/chart/ContentEdit/components/EditShortcutKey/ShortcutKeyModal.vue +++ b/src/views/chart/ContentEdit/components/EditShortcutKey/ShortcutKeyModal.vue @@ -19,7 +19,8 @@ {{ item.label }} {{ item.win }} - + {{ item.mac }} + {{ item.mac.substr(0, 1) }} + {{ item.mac.substr(3) }} @@ -44,25 +45,16 @@ defineProps({ // 快捷键 const shortcutKeyOptions = [ { - label: '向上移动', - win: `${WinKeyboard.CTRL.toUpperCase()} + ↑ `, + label: '拖拽画布', + win: `${WinKeyboard.SPACE.toUpperCase()} + 🖱️ `, + mac: `${MacKeyboard.SPACE.toUpperCase()} + 🖱️ `, + macSource: true + }, + { + label: '向 上/右/下/左 移动', + win: `${WinKeyboard.CTRL.toUpperCase()} + ↑ 或 → 或 ↓ 或 ←`, mac: `${MacKeyboard.CTRL.toUpperCase()} + ↑ ` }, - { - label: '向右移动', - win: `${WinKeyboard.CTRL.toUpperCase()} + → `, - mac: `${MacKeyboard.CTRL.toUpperCase()} + → ` - }, - { - label: '向下移动', - win: `${WinKeyboard.CTRL.toUpperCase()} + ↓ `, - mac: `${MacKeyboard.CTRL.toUpperCase()} + ↓ ` - }, - { - label: '向左移动', - win: `${WinKeyboard.CTRL.toUpperCase()} + ← `, - mac: `${MacKeyboard.CTRL.toUpperCase()} + ← ` - }, { label: '锁定', win: `${WinKeyboard.CTRL.toUpperCase()} + L `,