فهرست منبع

perf: 新增快捷键说明

奔跑的面条 2 سال پیش
والد
کامیت
90d7060a22
2فایلهای تغییر یافته به همراه11 افزوده شده و 18 حذف شده
  1. 2 1
      src/enums/editPageEnum.ts
  2. 9 17
      src/views/chart/ContentEdit/components/EditShortcutKey/ShortcutKeyModal.vue

+ 2 - 1
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'
 }

+ 9 - 17
src/views/chart/ContentEdit/components/EditShortcutKey/ShortcutKeyModal.vue

@@ -19,7 +19,8 @@
         <tr v-for="(item, index) in shortcutKeyOptions" :key="index">
           <td>{{ item.label }}</td>
           <td>{{ item.win }}</td>
-          <td>
+          <td v-if="item.macSource">{{ item.mac }}</td>
+          <td v-else>
             <n-gradient-text :size="22">{{ item.mac.substr(0, 1) }}</n-gradient-text>
             + {{ item.mac.substr(3) }}
           </td>
@@ -44,24 +45,15 @@ defineProps({
 // 快捷键
 const shortcutKeyOptions = [
   {
-    label: '向上移动',
-    win: `${WinKeyboard.CTRL.toUpperCase()} + ↑ `,
-    mac: `${MacKeyboard.CTRL.toUpperCase()} + ↑ `
-  },
-  {
-    label: '向右移动',
-    win: `${WinKeyboard.CTRL.toUpperCase()} + → `,
-    mac: `${MacKeyboard.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: '锁定',