소스 검색

fix:表格小数位

zqbao 6 달 전
부모
커밋
5ead36bf46
1개의 변경된 파일0개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 4
      services/data/excel/mixed_table.go

+ 0 - 4
services/data/excel/mixed_table.go

@@ -1263,10 +1263,6 @@ func getDecimalLen(str string, isPercent bool) (decimalPlaces int) {
 }
 
 func roundNumber(num string, decimalPlaces int, hasPercent bool) string {
-	if strings.Contains(num, "%") {
-		hasPercent = true
-		num = strings.Trim(num, "%")
-	}
 	numFloat, _ := strconv.ParseFloat(num, 64)
 	numFloat, _ = decimal.NewFromFloat(numFloat).Round(int32(decimalPlaces)).Float64()