From 29d835aeb3c99a3e8c50dd836612d83f821f3b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Wed, 12 Nov 2025 09:47:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E9=80=89=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=9B=BE=E5=B1=82=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Canvas/CanvasEditor/commands/LayerCommands.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/component/Canvas/CanvasEditor/commands/LayerCommands.js b/src/component/Canvas/CanvasEditor/commands/LayerCommands.js index 692b16ea..67cb05e4 100644 --- a/src/component/Canvas/CanvasEditor/commands/LayerCommands.js +++ b/src/component/Canvas/CanvasEditor/commands/LayerCommands.js @@ -528,6 +528,7 @@ export class RemoveLayerCommand extends Command { this.layerIndex = this.layers.value.findIndex( (layer) => layer.id === this.layerId ); + this.removedLayer = this.layers.value[this.layerIndex]; this.isActiveLayer = this.layerId === this.activeLayerId.value; @@ -593,6 +594,9 @@ export class RemoveLayerCommand extends Command { } }); + this.layerIndex = this.layers.value.findIndex( + (layer) => layer.id === this.layerId + ); // 从图层列表中删除 this.layers.value.splice(this.layerIndex, 1);