Prechádzať zdrojové kódy

混合表格单元格格式转换

xyxie 1 rok pred
rodič
commit
d2cb6fb38a
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  1. 3 0
      services/data/excel/mixed_table.go

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

@@ -1195,6 +1195,9 @@ func handleMixCellShowStyle(showStyleList []string, calculateCellMap map[string]
 // changePointDecimalPlaces 小数点位数加减和百分比格式
 func changePointDecimalPlaces(str string, changeNum int, numberType string, isPercent bool) (newStr string) {
 	newStr = str
+	if numberType == "" && changeNum == 0 {
+		return
+	}
 	// 把字符串转成浮点数
 	val, _ := strconv.ParseFloat(str, 64)
 	if isPercent {