From 550d9e378e3548737a57c75c2b0aeda3b79efe0a Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 13 Jun 2025 19:23:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=B9=E5=99=A8=E4=BD=99=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/Liquid/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/home/Liquid/index.vue b/src/components/home/Liquid/index.vue index 7b389b4..bd5749e 100644 --- a/src/components/home/Liquid/index.vue +++ b/src/components/home/Liquid/index.vue @@ -10,7 +10,7 @@ const props = defineProps({ }, }) const solutionStyle = computed(() => { - const difference = props.data.capacityUsed / props.data.capacityTotal + const difference = (props.data.capacityTotal - props.data.capacityUsed) / props.data.capacityTotal const process = 100 - (difference * 100) const filter = difference > 0.4 ? 'hue-rotate(270deg) saturate(100) brightness(81%)' : difference > 0.1 ? 'hue-rotate(150deg) saturate(100)' : 'hue-rotate(120deg) saturate(100)' return { @@ -19,7 +19,7 @@ const solutionStyle = computed(() => { } }) -const percentage = computed(() => Number((props.data.capacityUsed / props.data.capacityTotal).toFixed(2)) * 100) +const percentage = computed(() => Number(((props.data.capacityTotal - props.data.capacityUsed) / props.data.capacityTotal).toFixed(2)) * 100)