From 91ba7eb34ed3dd05ab3095eca3ef07a442f3a0d6 Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Tue, 1 Jul 2025 17:14:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=BB=E5=BA=A6=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/liquid/LiquidLevel.vue | 17 ++++++++--------- src/components/liquid/ScaleRuler.vue | 9 ++++----- src/stores/deviceStore.ts | 1 - 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/components/liquid/LiquidLevel.vue b/src/components/liquid/LiquidLevel.vue index cef81c0..389145d 100644 --- a/src/components/liquid/LiquidLevel.vue +++ b/src/components/liquid/LiquidLevel.vue @@ -8,7 +8,7 @@ import { computed, onMounted, ref, watchEffect } from 'vue' import { useLiquidStore } from '@/stores/liquidStore' const elementHeight = ref(200) -const liquidContailRef = ref(null) +const liquidContainelRef = ref(null) const rulerHeight = ref(0) onMounted(() => { @@ -17,11 +17,11 @@ onMounted(() => { elementHeight.value = element.clientHeight console.log('元素高度:', elementHeight.value) } - if (liquidContailRef.value) { - console.log('liquidContailRef=offsetHeight==', liquidContailRef.value.offsetHeight) - rulerHeight.value = liquidContailRef.value.offsetHeight + 5 + if (liquidContainelRef.value) { + rulerHeight.value = liquidContainelRef.value.offsetHeight } }) + const liquidStore = useLiquidStore() const liquidStateData = ref(liquidStore.liquidStateData) const liquidTotal = ref(liquidStore.liquidTotal) @@ -43,10 +43,9 @@ const liquidHeight = computed(() => {