feat: 千位制处理时,去除逗号后的空格
This commit is contained in:
@@ -1291,7 +1291,7 @@ export function toUpperCaseByString (str) {
|
||||
*/
|
||||
export function numberWithCommas (num) {
|
||||
if (typeof num === 'number') {
|
||||
return num.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ', ')
|
||||
return num.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ',')
|
||||
} else {
|
||||
return num
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user