Skip to content

Commit

Permalink
fix(Field): should not modify the value if it's within the min/max (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmpk authored Feb 9, 2025
1 parent 6f507b9 commit b420f36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vant/src/field/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ export default defineComponent({
props.min ?? -Infinity,
props.max ?? Infinity,
);
value = adjustedValue.toString();
if (+value !== adjustedValue) {
value = adjustedValue.toString();
}
}
}

Expand Down

0 comments on commit b420f36

Please sign in to comment.