From b32772da66d471bf0cf4b90b7120157b3def55cc Mon Sep 17 00:00:00 2001 From: xuqingkai Date: Mon, 18 Dec 2023 21:17:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(textarea):=20=E4=BF=AE=E5=A4=8Dh5=E4=B8=8B?= =?UTF-8?q?=E5=8F=8C=E5=90=91=E7=BB=91=E5=AE=9A=E5=A4=B1=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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)); }