猜猜看!=回答并尝试>0:
在全局函数下使用
const numberWithCommas = (x) => { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }