chore:修正写法

This commit is contained in:
ShakeFlower 2025-06-23 17:24:37 +08:00
parent 32184d23a2
commit 5b5708c5cb

View File

@ -58,7 +58,7 @@ export const SaveBtn = defineComponent<
const statusFont = new Font('normal', 14); const statusFont = new Font('normal', 14);
const data = ref<SaveData | null>(null); const data = ref<SaveData | null>(null);
const mapBlocks = computed(() => { const mapBlocks = computed(() => {
if (data.value == null) return void 0; if (data.value === null) return void 0;
else { else {
const currData = data.value?.data; const currData = data.value?.data;
const map = core.maps.loadMap(currData.maps, currData.floorId); const map = core.maps.loadMap(currData.maps, currData.floorId);
@ -103,14 +103,14 @@ export const SaveBtn = defineComponent<
lineJoin="miter" lineJoin="miter"
/> />
<Thumbnail <Thumbnail
hidden={data.value == null} hidden={data.value === null}
loc={[3, 26, w - 6, w - 4]} loc={[3, 26, w - 6, w - 4]}
padStyle="gray" padStyle="gray"
floorId={data.value?.data.floorId || 'MT0'} floorId={data.value?.data.floorId || 'MT0'}
map={mapBlocks.value} map={mapBlocks.value}
hero={data.value?.data.hero as HeroStatus} hero={data.value?.data.hero as HeroStatus}
all={true} all
noHD={true} noHD
size={w / MAP_WIDTH} size={w / MAP_WIDTH}
/> />
<text <text
@ -177,7 +177,7 @@ export const Save = defineComponent<SaveProps, SaveEmits, keyof SaveEmits>(
const [key] = useKey(); const [key] = useKey();
key.realize('confirm', () => { key.realize('confirm', () => {
const currPage = pageRef.value?.now(); const currPage = pageRef.value?.now();
if (currPage == null) return; if (currPage === void 0) return;
emitSave(pageCap * currPage + pickIndex.value); emitSave(pageCap * currPage + pickIndex.value);
}) })
.realize('exit', exit) .realize('exit', exit)