From c07c481a6c786091a1d24ee5bc0733b04d45f0fa Mon Sep 17 00:00:00 2001 From: Hide_D Date: Thu, 7 Apr 2022 01:33:08 +0900 Subject: [PATCH] =?UTF-8?q?misc:=20=EC=84=B8=EB=A0=A5=EC=9E=A5=EC=88=98=20?= =?UTF-8?q?=EA=B0=B1=EC=8B=A0=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/PageNationGeneral.vue | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/hwe/ts/PageNationGeneral.vue b/hwe/ts/PageNationGeneral.vue index 24007e1c..6297baa2 100644 --- a/hwe/ts/PageNationGeneral.vue +++ b/hwe/ts/PageNationGeneral.vue @@ -1,8 +1,15 @@ @@ -34,7 +41,7 @@ const envVal = ref({ turntime: "2022-02-22 22:22:22.22222", }); -const toolbarID = 'toolbar-id'; +const toolbarID = "toolbar-id"; const gameConstStore = ref(); provide("gameConstStore", gameConstStore); @@ -51,7 +58,7 @@ void Promise.all([storeP]).then(() => { asyncReady.value = true; }); -onMounted(async () => { +async function reload() { try { const { column, list, permission, troops, env } = await SammoAPI.Nation.GeneralList(); troopList.value = {}; @@ -72,7 +79,7 @@ onMounted(async () => { return { permission, ...v }; }); - for(const [troopLeader, troopName] of troops){ + for (const [troopLeader, troopName] of troops) { troopList.value[troopLeader] = troopName; } } else { @@ -83,6 +90,10 @@ onMounted(async () => { console.error(e); throw e; } +} + +onMounted(async () => { + await reload(); });