Skip to content

Commit

Permalink
fix(input): 修复 复制包含多个'-'的数字到input type=digit 时,格式错误 (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
Young6-me committed Jun 7, 2024
1 parent f0aa112 commit 0de3dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-vant/src/components/utils/format/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function formatNumber(
if (allowMinus) {
value = trimExtraChar(value, '-', /-/g)
} else {
value = value.replace(/-/, '')
value = value.replace(/-/g, '')
}

const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g
Expand Down

0 comments on commit 0de3dd6

Please sign in to comment.