From bba07a4a5793c4790067c7f8cd93c2d86deb6f02 Mon Sep 17 00:00:00 2001 From: StarHeartHunt Date: Wed, 13 Mar 2024 10:28:16 +0800 Subject: [PATCH] fix: fix type --- src/widgets/MedalList/types.ts | 1 - src/widgets/MemoryList/Memory.vue | 16 ++++++---------- src/widgets/MemoryList/index.vue | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/widgets/MedalList/types.ts b/src/widgets/MedalList/types.ts index 77ee2f9..5ca2989 100644 --- a/src/widgets/MedalList/types.ts +++ b/src/widgets/MedalList/types.ts @@ -18,7 +18,6 @@ export interface MedalGroup { desc: string; color: string; bindEvent: Array; - alias: string; deprecateType?: string; hasChangedInRetro?: boolean; medal: Array; diff --git a/src/widgets/MemoryList/Memory.vue b/src/widgets/MemoryList/Memory.vue index a97929f..c368dba 100644 --- a/src/widgets/MemoryList/Memory.vue +++ b/src/widgets/MemoryList/Memory.vue @@ -7,6 +7,12 @@ import { getImagePath } from "@/utils/utils"; import { CharMemory, Memory } from "./types"; +const getSrcMedal = (mmr: Memory) => + `https://torappu.prts.wiki/assets/medal_icon/${mmr.medal.id}`; + +const getSrcElite = (elite: string) => + `/images/${getImagePath(`图标_升级_精英化${elite || "0"}.png`)}`; + export default defineComponent({ name: "Memory", components: { @@ -42,16 +48,6 @@ export default defineComponent({ const link = computed(() => { return `/w/${props.charMemory.char}`; }); - const getSrcElite = (elite: string) => { - return `/images/${getImagePath(`图标_升级_精英化${elite || "0"}.png`)}`; - }; - const getSrcMedal = (mmr: Memory) => { - /* - const search = mmr.medal.alias.replace(" ", "_"); - return `/images/${getImagePath(`蚀刻章_${search}.png`)}`; - */ - return `https://torappu.prts.wiki/assets/medal_icon/${mmr.medal.id}`; - }; const srcfavor = `/images/${getImagePath("图标_信赖.png")}`; const srcplay = `/images/${getImagePath("情报处理室_播放按钮.png")}`; return { diff --git a/src/widgets/MemoryList/index.vue b/src/widgets/MemoryList/index.vue index 2cce33a..5f242d1 100644 --- a/src/widgets/MemoryList/index.vue +++ b/src/widgets/MemoryList/index.vue @@ -153,7 +153,7 @@ export default defineComponent({ .map(([, value]: [string, any]) => { return { medal: value.name as string, - alias: value.alias as string, + id: value.id as string, desc: value.desc as string, method: value.method as string, };