小数保留n位,不四舍五入 (只用toFixed(n)
会自动四舍五入)
getNumber(value,n){
return (Math.floor(value * Math.pow(10,n)) / Math.pow(10,n)).toFixed(n);
}
小数保留n位,不四舍五入 (只用toFixed(n)
会自动四舍五入)
getNumber(value,n){
return (Math.floor(value * Math.pow(10,n)) / Math.pow(10,n)).toFixed(n);
}