Skip to content

Commit aa5f27b

Browse files
BaLaLaLsgitee-org
authored andcommitted
修复 floatToFixed2 函数某些情况下计算结果为零 Closes #I8671C
Signed-off-by: 风狗 <[email protected]>
1 parent 04a94ad commit aa5f27b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ export const floatToFixed2 = (num: number | string | undefined): string => {
205205
case 1:
206206
str = f.toString() + '0'
207207
break
208+
case 2:
209+
str = f.toString()
210+
break
208211
}
209212
return str
210213
}

0 commit comments

Comments
 (0)