mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
!219 update src/utils/type.ts.
Merge pull request !219 from chillley/N/A
This commit is contained in:
commit
fddb834806
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user