From 98a0e13aeec43269672a17502d35e85baa986e73 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Tue, 24 Jun 2025 11:25:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B7=BB=E5=8A=A0=E5=AD=98=E6=A1=A3?= =?UTF-8?q?=E7=9A=84=E4=BA=BA=E7=89=A9=E5=B1=9E=E6=80=A7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client-modules/src/render/ui/save.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages-user/client-modules/src/render/ui/save.tsx b/packages-user/client-modules/src/render/ui/save.tsx index 72c9cb6..2cf7eb4 100644 --- a/packages-user/client-modules/src/render/ui/save.tsx +++ b/packages-user/client-modules/src/render/ui/save.tsx @@ -56,15 +56,22 @@ export const SaveBtn = defineComponent(props => { const mapBlocks = computed(() => { if (props.data === null || props.data === undefined) return void 0; else { - const currData = props.data?.data; + const currData = props.data.data; const map = core.maps.loadMap(currData.maps, currData.floorId); core.extractBlocksForUI(map, currData.hero.flags); // 这一步会向map写入blocks return map.blocks; } }); - const text = computed(() => + const name = computed(() => props.index === -1 ? '自动存档' : `存档${props.index + 1}` ); + const statusText = computed(() => { + if (props.data === null || props.data === undefined) return ''; + else { + const hero = props.data.data.hero; + return `${hero.hp}/${hero.atk}/${hero.def}`; + } + }); const strokeStyle = computed(() => { if (props.isSelected) return props.isDelete ? 'red' : 'gold'; else return 'white'; @@ -74,7 +81,7 @@ export const SaveBtn = defineComponent(props => { return () => ( @@ -99,7 +106,7 @@ export const SaveBtn = defineComponent(props => { size={w / MAP_WIDTH} />