!219 update src/utils/type.ts.

Merge pull request !219 from chillley/N/A
This commit is contained in:
奔跑的面条 2024-03-06 03:06:41 +00:00 committed by Gitee
commit fddb834806
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -24,8 +24,8 @@ export function isArray(p: any): p is [] {
return Array.isArray(p)
}
export const toNumber = (number: number | string, toFixedNumber = 2) => {
return isString(number) ? parseFloat(parseFloat(number).toFixed(2)) : number
export const toNumber = (number: number | string, toFixedNumber: number = 2) => {
return isString(number) ? parseFloat(parseFloat(number).toFixed(toFixedNumber)) : number
}
export const toString = (str: any) => {