fix(van-field): Invalid maxlength on Android devices

This commit is contained in:
Fanburger 2023-04-18 21:21:07 +08:00 committed by GitHub
parent 466b9b5504
commit 05f6159df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,8 @@ VantComponent({
const { maxlength } = this.data;
if (maxlength !== -1 && value.length > maxlength) {
return;
this.value = value.slice(0, maxlength);
event.detail.value = this.value;
}
this.setShowClear();