From 50bf2a4614ba00ccb6a7a214340666651c710bfe Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 13 Mar 2023 00:00:01 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8F=84=EC=8B=9C=20=EC=83=81=EC=9D=B8?= =?UTF-8?q?=20%=20=ED=91=9C=EA=B8=B0=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/ts/components/CityBasicCard.vue | 15 +++++++++++++-- hwe/ts/components/SammoBar.vue | 11 ++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/hwe/ts/components/CityBasicCard.vue b/hwe/ts/components/CityBasicCard.vue index 93667e31..3d3a91b1 100644 --- a/hwe/ts/components/CityBasicCard.vue +++ b/hwe/ts/components/CityBasicCard.vue @@ -92,8 +92,8 @@
시세
- -
{{ city.trade ? `${city.trade}%` : "상인 없음" }}
+ +
{{ tradeAltText }}
@@ -135,12 +135,23 @@ const city = toRef(props, "city"); const cityRegionText = ref(""); const cityLevelText = ref(""); +const tradeAltText = ref("-"); +const tradeBarPercent = ref(0); watch( city, (city) => { const cityInfo = gameConstStore.value.cityConst[city.id]; cityRegionText.value = gameConstStore.value.cityConstMap.region[cityInfo.region] as string; cityLevelText.value = gameConstStore.value.cityConstMap.level[city.level] as string; + + if(city.trade) { + tradeAltText.value = `${city.trade}%`; + // FIXME: 수치가 고정이라는 가정임 + tradeBarPercent.value = (city.trade - 95) * 10; + } else { + tradeAltText.value = "상인 없음"; + tradeBarPercent.value = 0; + } }, { immediate: true } ); diff --git a/hwe/ts/components/SammoBar.vue b/hwe/ts/components/SammoBar.vue index 007a0a2c..33ee494d 100644 --- a/hwe/ts/components/SammoBar.vue +++ b/hwe/ts/components/SammoBar.vue @@ -1,7 +1,7 @@