🐛(component): [countUp]修复 useGrouping 属性异常
This commit is contained in:
parent
82ff66d363
commit
2b36f7f8d0
@ -55,7 +55,7 @@ const formatNumber = (num: number | string): string => {
|
||||
let x1 = x[0];
|
||||
const x2 = x.length > 1 ? props.decimal + x[1] : "";
|
||||
const rgx = /(\d+)(\d{3})/;
|
||||
if (props.separator && !isNumber(props.separator)) {
|
||||
if (props.useGrouping && props.separator && !isNumber(props.separator)) {
|
||||
while (rgx.test(x1)) {
|
||||
x1 = x1.replace(rgx, "$1" + props.separator + "$2");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user