numFilter(num) {
let f = parseFloat(num)
if(isNaN(f)) {
return false
}
f = Math.round(num * 100) / 100
let s = f.toString()
let rs = s.indexOf(‘ . ’)
if(rs < 0) {
rs = s.length
s += ‘ . ‘
}
while(s.length <= rs +2) {
s += ‘ 0 ‘
}
return s
}
时间:2020-02-13 17:04:56
numFilter(num) {
let f = parseFloat(num)
if(isNaN(f)) {
return false
}
f = Math.round(num * 100) / 100
let s = f.toString()
let rs = s.indexOf(‘ . ’)
if(rs < 0) {
rs = s.length
s += ‘ . ‘
}
while(s.length <= rs +2) {
s += ‘ 0 ‘
}
return s
}
高三毕业生的 heartfelt 感悟与寄语:20篇精选100字感言
2024-09-05