From 55947ceb16870d13f119a61acb3b2575a7fd7249 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FUDKNA8\\znjsz" Date: Wed, 20 Mar 2024 09:18:16 +0800 Subject: [PATCH] update --- src/components/Chart/RateChart.vue | 10 ++++++---- src/pages/ThreeDimension.vue | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/Chart/RateChart.vue b/src/components/Chart/RateChart.vue index f49581b..6e3699d 100644 --- a/src/components/Chart/RateChart.vue +++ b/src/components/Chart/RateChart.vue @@ -33,10 +33,12 @@ watch( ); const rate = computed(() => { - const _rate = ((props.rawData.nowYield / props.rawData.targetYield) * 100) - .toFixed(2) - .toString(); - return [parseInt(_rate), _rate.split(".")[1]]; + if (!props.rawData.nowYield || props.rawData.nowYield == 0) return [0, 0]; + // const _rate = ((props.rawData.nowYield / props.rawData.targetYield) * 100) + // .toFixed(2) + // .toString(); + // return [parseInt(_rate), _rate.split(".")[1]]; + return [parseInt(props.rawData.nowYield), props.rawData.nowYield.split(".")[1]]; }); const chart = ref(null); diff --git a/src/pages/ThreeDimension.vue b/src/pages/ThreeDimension.vue index 096b0f7..e3da4b3 100644 --- a/src/pages/ThreeDimension.vue +++ b/src/pages/ThreeDimension.vue @@ -36,7 +36,7 @@ const props = defineProps({ } .data-list { - height: 100%; + /* height: 100%; */ width: 480px; position: absolute;