From cbda4b3d0bbe36f92f20269cd35f44168c4b049a Mon Sep 17 00:00:00 2001 From: BTMuli Date: Sat, 6 Jan 2024 18:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9B=B4=E6=96=B0=E5=AD=90=E7=BB=84=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/wiki/twc-character.vue | 11 ++++++----- src/components/wiki/twc-constellations.vue | 18 +++++++++++++----- src/components/wiki/twc-skills.vue | 11 ++++++++--- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/components/wiki/twc-character.vue b/src/components/wiki/twc-character.vue index e72ae55d..32b5d59c 100644 --- a/src/components/wiki/twc-character.vue +++ b/src/components/wiki/twc-character.vue @@ -100,9 +100,10 @@ interface TwcCharacterProps { item: TGApp.App.Character.WikiBriefInfo; } -interface TwcCharacterEmits { - error: (err: Error) => void; -} +type TwcCharacterEmits = { + (e: "update:modelValue", value: TGApp.App.Character.WikiBriefInfo): void; + (e: "error"): void; +}; const props = defineProps(); const emits = defineEmits(); @@ -126,7 +127,7 @@ const box = computed(() => { async function loadData(): Promise { try { - const res = await getWikiData("Character", props.item.id); + const res = await getWikiData("Character", props.item.id.toString()); if (res === undefined) return; data.value = res.default; showSnackbar({ @@ -139,7 +140,7 @@ async function loadData(): Promise { color: "error", }); console.error(error); - emits("error", error); + emits("error"); } } diff --git a/src/components/wiki/twc-constellations.vue b/src/components/wiki/twc-constellations.vue index 6de2796c..ce4f853b 100644 --- a/src/components/wiki/twc-constellations.vue +++ b/src/components/wiki/twc-constellations.vue @@ -2,8 +2,8 @@
@@ -26,7 +26,7 @@