We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0aa112 commit 0de3dd6Copy full SHA for 0de3dd6
packages/react-vant/src/components/utils/format/number.ts
@@ -32,7 +32,7 @@ export function formatNumber(
32
if (allowMinus) {
33
value = trimExtraChar(value, '-', /-/g)
34
} else {
35
- value = value.replace(/-/, '')
+ value = value.replace(/-/g, '')
36
}
37
38
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g
0 commit comments