From e23473862b26d9b3bc99618664761a67aa665a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sun, 14 Jul 2024 08:40:52 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20add=20missing=20await?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/wiki/twg-card.vue | 4 ++-- src/pages/WIKI/Character.vue | 9 ++++++++- src/pages/WIKI/Weapon.vue | 9 ++++++++- src/pages/common/Announcements.vue | 7 +++---- src/views/t-anno.vue | 6 +++--- 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/components/wiki/twg-card.vue b/src/components/wiki/twg-card.vue index 1f7acf38..9290ce7e 100644 --- a/src/components/wiki/twg-card.vue +++ b/src/components/wiki/twg-card.vue @@ -18,7 +18,7 @@ interface TwgCardProps { const props = defineProps(); -function toWiki(): void { +async function toWiki(): Promise { if (!props.data.contentId || props.data.contentId === 0) { showSnackbar({ text: `卡牌 ${props.data.name} 暂无外部链接`, @@ -27,7 +27,7 @@ function toWiki(): void { return; } const url = Mys.Api.Obc.replace("{contentId}", props.data.contentId.toString()); - createTGWindow( + await createTGWindow( url, "Sub_window", `Content_${props.data.contentId} ${props.data.name}`, diff --git a/src/pages/WIKI/Character.vue b/src/pages/WIKI/Character.vue index 48ba4621..9c92d41e 100644 --- a/src/pages/WIKI/Character.vue +++ b/src/pages/WIKI/Character.vue @@ -126,7 +126,14 @@ async function toOuter(item?: TGApp.App.Character.WikiBriefInfo): Promise return; } const url = Mys.Api.Obc.replace("{contentId}", item.contentId.toString()); - createTGWindow(url, "Sub_window", `Content_${item.contentId} ${item.name}`, 1200, 800, true); + await createTGWindow( + url, + "Sub_window", + `Content_${item.contentId} ${item.name}`, + 1200, + 800, + true, + ); }