数字后面添加w 人人都是小伙伴 2023-02-22 124 阅读1分钟 function numToW(num) { // 这里我们是需要w保留两位小数(如:1.22W) return num >= 10000 ? Math.floor(num / 100) / 100 + "w" : num; }