Skip to content

Commit 889334b

Browse files
YunaiVgitee-org
authored andcommitted
!266 修复 floatToFixed2 函数某些情况下计算结果为零 Closes #I8671C
Merge pull request !266 from 风狗/N/A
2 parents fa71f85 + aa5f27b commit 889334b

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)