From 4c7d3467c37422420634de213443341b0411bce5 Mon Sep 17 00:00:00 2001 From: weisheng <1780903673@qq.com> Date: Wed, 20 Dec 2023 15:15:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(textarea,=20taro):=20=E4=BF=AE=E5=A4=8D=20h?= =?UTF-8?q?5=20=E4=B8=8B=E5=8F=8C=E5=90=91=E7=BB=91=E5=AE=9A=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98=20(#2768)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #2767 --- src/packages/__VUE/textarea/index.taro.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/packages/__VUE/textarea/index.taro.vue b/src/packages/__VUE/textarea/index.taro.vue index 5979c69da9..e978d3590d 100644 --- a/src/packages/__VUE/textarea/index.taro.vue +++ b/src/packages/__VUE/textarea/index.taro.vue @@ -125,9 +125,8 @@ export default create({ _onInput(event); } }; - const _onInput = (event: Event) => { - const input = event.target as HTMLInputElement; - let value = input.value; + const _onInput = (event: any) => { + let { value } = event.detail; if (props.maxLength && value.length > Number(props.maxLength)) { value = value.slice(0, Number(props.maxLength)); }