mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
小于5显示数字,不显示0
This commit is contained in:
@@ -410,7 +410,7 @@ export function translate(field) {
|
|||||||
/**格式化人数的文档 ,学习人数,关注人数等*/
|
/**格式化人数的文档 ,学习人数,关注人数等*/
|
||||||
export function formatUserNumber(num) {
|
export function formatUserNumber(num) {
|
||||||
let rsNum =0;
|
let rsNum =0;
|
||||||
if(num<5){return 0;}
|
if(num<5){return num;}
|
||||||
if(num>=5 && num<= 10){return 10 +"+";}
|
if(num>=5 && num<= 10){return 10 +"+";}
|
||||||
if(num<=94){
|
if(num<=94){
|
||||||
rsNum=Math.round((num)/10)*10;
|
rsNum=Math.round((num)/10)*10;
|
||||||
|
|||||||
Reference in New Issue
Block a user