diff --git a/packages/react-vant/src/components/utils/format/number.ts b/packages/react-vant/src/components/utils/format/number.ts index 78e88f778..827a0ddd9 100644 --- a/packages/react-vant/src/components/utils/format/number.ts +++ b/packages/react-vant/src/components/utils/format/number.ts @@ -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