diff --git a/packages/vant/src/field/Field.tsx b/packages/vant/src/field/Field.tsx index 10aca6c6b..dfc34c445 100644 --- a/packages/vant/src/field/Field.tsx +++ b/packages/vant/src/field/Field.tsx @@ -303,7 +303,9 @@ export default defineComponent({ } if (inputRef.value && inputRef.value.value !== value) { + const { selectionStart, selectionEnd } = inputRef.value; inputRef.value.value = value; + inputRef.value.setSelectionRange(selectionStart, selectionEnd); } if (value !== props.modelValue) {