From 6c6f383d012c6697484cf8f5add0d2cf6f139261 Mon Sep 17 00:00:00 2001 From: Formula <84565335+Formulaaa@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:13:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(input-number):=20=E4=BF=AE=E5=A4=8D=20iOS?= =?UTF-8?q?=20=E4=B8=8B=E8=BE=93=E5=85=A5=E5=B0=8F=E6=95=B0=E7=82=B9?= =?UTF-8?q?=E5=90=8E=E6=B8=85=E7=A9=BA=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2704)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #2664 --- src/packages/__VUE/inputnumber/index.taro.vue | 2 +- src/packages/__VUE/inputnumber/index.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/packages/__VUE/inputnumber/index.taro.vue b/src/packages/__VUE/inputnumber/index.taro.vue index 271ce667cc..bb60d98753 100644 --- a/src/packages/__VUE/inputnumber/index.taro.vue +++ b/src/packages/__VUE/inputnumber/index.taro.vue @@ -97,7 +97,7 @@ export default create({ }; const change = (event: Event) => { const input = event.target as HTMLInputElement; - emit('update:modelValue', Number(input.value), event); + emit('update:modelValue', input.value, event); }; const emitChange = (value: string | number, event: Event) => { let output_value: number | string = fixedDecimalPlaces(value); diff --git a/src/packages/__VUE/inputnumber/index.vue b/src/packages/__VUE/inputnumber/index.vue index 8eafe94633..f19088854c 100644 --- a/src/packages/__VUE/inputnumber/index.vue +++ b/src/packages/__VUE/inputnumber/index.vue @@ -92,7 +92,8 @@ export default create({ }; const change = (event: Event) => { const input = event.target as HTMLInputElement; - emit('update:modelValue', input.valueAsNumber, event); + + emit('update:modelValue', input.value, event); }; const emitChange = (value: string | number, event: Event) => { let output_value: number | string = fixedDecimalPlaces(value); @@ -154,6 +155,7 @@ export default create({ } return value; }; + watch( () => [props.max, props.min], () => {