CN-1219: 实体搜索页下方统计原型优化

This commit is contained in:
刘洪洪
2023-08-11 17:53:51 +08:00
parent 1492fe217c
commit 8b1e57eaa1
12 changed files with 108 additions and 33 deletions

View File

@@ -1360,10 +1360,10 @@ export function toUpperCaseByString (str) {
* @returns {string}
*/
export function numberWithCommas (num) {
if (typeof num === 'number') {
if (num) {
return num.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ',')
} else {
return num
return '-'
}
}