修复用默认格式导致的浮点数格式化为整数
This commit is contained in:
parent
1c64c63ab6
commit
299fe38c66
@ -139,6 +139,10 @@ func (f *Format) String(v float64) string {
|
||||
|
||||
switch f.vType {
|
||||
case TYPE_NUMERIC:
|
||||
if 0 == f.bts && nil != f.Raw && "general" == f.Raw[0] {
|
||||
f.bts = -1
|
||||
}
|
||||
|
||||
ret = strconv.FormatFloat(v, 'f', f.bts, 64)
|
||||
case TYPE_CURRENCY:
|
||||
ret = strconv.FormatFloat(v, 'f', f.bts, 64)
|
||||
|
Loading…
Reference in New Issue
Block a user