修复负值显示错误
改进页面显示
This commit is contained in:
liuyanxi975 committed 2022-05-30 17:51:11 +08:00
1 parent b4c295c531
commit 0e81e6571f
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -150,6 +150,9 @@ var funcMap = template.FuncMap{
},
"Transleft": func(a, b float64) (n float64) {
n, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", (100-(a/b)*100)), 64)
if n < 0 {
n = 0
}
return
},
"UintToFloat": func(a uint64) (n float64) {