为什么我这样只保留一位小数如97.6 ...
filters: { memberPic(val) { let pic = val * (that.discount / 10) var f = parseFloat(pic); if (isNaN(f)) { return; } f = Math.round(pic * 100) / 100; return f; } }
返回结果改一下
return f.toFixed(2);
1.4m articles
1.4m replys
5 comments
57.0k users