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 @@