From 8e0043f44c98fe344dc64f7eaa5e9ba073ba3130 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Thu, 16 Apr 2026 21:32:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E8=AE=A1=E7=AE=97=E5=B7=A5=E5=85=B7]?= =?UTF-8?q?=20=E4=BD=93=E7=A7=AF=E7=9B=B8=E5=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/calUnitTools.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/utils/calUnitTools.js b/src/utils/calUnitTools.js index 76e348d..a5f6ecb 100644 --- a/src/utils/calUnitTools.js +++ b/src/utils/calUnitTools.js @@ -45,6 +45,13 @@ export function subTj(valueArr, unitArr) { mixIndex = thisIndex < mixIndex ? thisIndex : mixIndex } + if (mixIndex === -1) { + return { + total: 0, + unit: 'mL' + } + } + let total = multiplyDecimals( parseFloat(valueArr[0]), Math.pow(1000, unit.indexOf(unitArr[0]) - mixIndex)