Showing
1 changed file
with
5 additions
and
1 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-01-22 11:40:12 | 2 | * @Date: 2025-01-22 11:40:12 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-02-08 14:27:04 | 4 | + * @LastEditTime: 2025-02-08 14:32:23 |
| 5 | * @FilePath: /map-demo/src/views/mapCutter.vue | 5 | * @FilePath: /map-demo/src/views/mapCutter.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -148,6 +148,7 @@ const triggerFileInput = () => { | ... | @@ -148,6 +148,7 @@ const triggerFileInput = () => { |
| 148 | }; | 148 | }; |
| 149 | 149 | ||
| 150 | const handleKeydown = (e) => { // 键盘控制 | 150 | const handleKeydown = (e) => { // 键盘控制 |
| 151 | + console.log(`按键: ${e.key}, Shift 是否按下: ${e.shiftKey}`) // 调试信息 | ||
| 151 | if (e.shiftKey && e.key === '=') { | 152 | if (e.shiftKey && e.key === '=') { |
| 152 | // 一些键盘可能需要 Shift 才能输入 `+`,但 `e.key` 实际上是 `=` | 153 | // 一些键盘可能需要 Shift 才能输入 `+`,但 `e.key` 实际上是 `=` |
| 153 | scaleImage(1.01) | 154 | scaleImage(1.01) |
| ... | @@ -165,6 +166,9 @@ const handleKeydown = (e) => { // 键盘控制 | ... | @@ -165,6 +166,9 @@ const handleKeydown = (e) => { // 键盘控制 |
| 165 | case 'ArrowRight': | 166 | case 'ArrowRight': |
| 166 | moveImage('right') | 167 | moveImage('right') |
| 167 | break | 168 | break |
| 169 | + case '+': | ||
| 170 | + scaleImage(1.01) | ||
| 171 | + break | ||
| 168 | case '-': | 172 | case '-': |
| 169 | scaleImage(0.99) | 173 | scaleImage(0.99) |
| 170 | break | 174 | break | ... | ... |
-
Please register or login to post a comment