hookehuyr

fix

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:14:42 4 + * @LastEditTime: 2025-02-08 14:27:04
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,10 @@ const triggerFileInput = () => { ...@@ -148,6 +148,10 @@ const triggerFileInput = () => {
148 }; 148 };
149 149
150 const handleKeydown = (e) => { // 键盘控制 150 const handleKeydown = (e) => { // 键盘控制
151 + if (e.shiftKey && e.key === '=') {
152 + // 一些键盘可能需要 Shift 才能输入 `+`,但 `e.key` 实际上是 `=`
153 + scaleImage(1.01)
154 + } else {
151 switch(e.key) { 155 switch(e.key) {
152 case 'ArrowUp': 156 case 'ArrowUp':
153 moveImage('up') 157 moveImage('up')
...@@ -161,9 +165,6 @@ const handleKeydown = (e) => { // 键盘控制 ...@@ -161,9 +165,6 @@ const handleKeydown = (e) => { // 键盘控制
161 case 'ArrowRight': 165 case 'ArrowRight':
162 moveImage('right') 166 moveImage('right')
163 break 167 break
164 - case '+':
165 - scaleImage(1.01)
166 - break
167 case '-': 168 case '-':
168 scaleImage(0.99) 169 scaleImage(0.99)
169 break 170 break
...@@ -174,6 +175,7 @@ const handleKeydown = (e) => { // 键盘控制 ...@@ -174,6 +175,7 @@ const handleKeydown = (e) => { // 键盘控制
174 rotateMap(-10) 175 rotateMap(-10)
175 break 176 break
176 } 177 }
178 + }
177 } 179 }
178 180
179 onMounted(async () => { 181 onMounted(async () => {
......