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(() => {