From e3c0788e0b9b21a64686dfb9dc1c4ca70698c89f Mon Sep 17 00:00:00 2001 From: xudan Date: Tue, 29 Jul 2025 14:11:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E6=9C=8D=E5=8A=A1=E7=9B=91=E6=8E=A7=E8=B0=83?= =?UTF-8?q?=E7=94=A8=EF=BC=8C=E4=BC=98=E5=8C=96=E9=94=81=E5=AE=9A=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=9A=84=E6=98=BE=E7=A4=BA=E5=B1=9E=E6=80=A7=E5=92=8C?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/movement-supervision.vue | 2 +- src/services/editor.service.ts | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/movement-supervision.vue b/src/pages/movement-supervision.vue index afaec1a..70a0679 100644 --- a/src/pages/movement-supervision.vue +++ b/src/pages/movement-supervision.vue @@ -138,7 +138,7 @@ onMounted(async () => { await readScene(); await editor.value?.initRobots(); await monitorScene(); - await storageLocationService.value?.startMonitoring({ interval: 3 }); + storageLocationService.value?.startMonitoring({ interval: 3 }); // 自动保存和恢复视图状态 await handleAutoSaveAndRestoreViewState(); }); diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index 03b64c3..6046499 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -643,16 +643,17 @@ export class EditorService extends Meta2d { if (existingIcon) { this.setValue({ id: lockIconId, visible: true }, { render: true, history: false, doEvent: false }); } else { - const { x = 0, y = 0, width = 0 } = this.getPenRect(pointPen); + const { x = 0, y = 0 } = this.getPenRect(pointPen); const iconPen: MapPen = { id: lockIconId, - name: 'image', + name: 'circle', tags: ['lock-icon'], - x: x - width / 2 - 20, // 在点左侧显示 - y: y - 10, - width: 16, - height: 16, - image: '/icons/lock.svg', + x: x - 14, // 在点右侧显示 + y: y + 16, + width: 8, + height: 8, + background: '#ff4d4f', // 红色背景 + color: '#ff4d4f', locked: LockState.Disable, visible: true, };