From 0d3ca6bda61e3912c7cf369b0ca90e39b0a774b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=A1=E6=9E=97?= <48042709+Huangyilin19@users.noreply.github.com> Date: Sun, 4 Jun 2023 23:43:13 -0700 Subject: [PATCH] =?UTF-8?q?fix(numeric):=20=E8=A7=A3=E5=86=B3bug:=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=95=B0=E5=80=BC=E7=B2=BE=E5=BA=A6=E5=90=8E?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=BE=93=E5=85=A5=E5=B0=8F=E6=95=B0=E7=82=B9?= =?UTF-8?q?;=20=E8=B6=85=E5=87=BA=E5=B0=8F=E6=95=B0=E4=BD=8D=E6=95=B0?= =?UTF-8?q?=E5=90=8E=E8=A3=81=E5=89=AA=E5=80=BC=E4=B8=8D=E5=AF=B9.=20(#270?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/renderless/src/common/bigInt.ts | 1 + packages/renderless/src/numeric/index.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/renderless/src/common/bigInt.ts b/packages/renderless/src/common/bigInt.ts index 130cf76b3..f6c85ff8c 100644 --- a/packages/renderless/src/common/bigInt.ts +++ b/packages/renderless/src/common/bigInt.ts @@ -188,6 +188,7 @@ export class BigIntDecimal { this.integer = BigInt(numbers[0]) const decimalStr = numbers[1] || '0' this.decimal = convertBigInt(decimalStr) + this.decimalLen = decimalStr.length } else { this.nan = true } diff --git a/packages/renderless/src/numeric/index.ts b/packages/renderless/src/numeric/index.ts index 5ae2a7fe8..005d89805 100644 --- a/packages/renderless/src/numeric/index.ts +++ b/packages/renderless/src/numeric/index.ts @@ -263,7 +263,6 @@ export const handleInput = ({ state, api, emit, props }) => (event) => { event.target.value = isNull(value) ? '' : value state.lastInput = value state.userInput = value - api.setCurrentValue(value === '-' ? 0 : value) } export const handleInputChange = ({ api }) => (event) => {