diff --git a/package/component/src/component/countUp/index.vue b/package/component/src/component/countUp/index.vue index 43fd56f6..195c86e9 100644 --- a/package/component/src/component/countUp/index.vue +++ b/package/component/src/component/countUp/index.vue @@ -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"); } diff --git a/package/document-component/src/document/zh-CN/components/countup.md b/package/document-component/src/document/zh-CN/components/countup.md index f189070a..8a7666c6 100644 --- a/package/document-component/src/document/zh-CN/components/countup.md +++ b/package/document-component/src/document/zh-CN/components/countup.md @@ -7,7 +7,7 @@ ::: demo