为什么我这样只保留一位小数如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);
2.1m questions
2.1m answers
60 comments
57.0k users