Methods
(static) format(val, n, prefix) → {string}
金额格式转换函数
Parameters:
Name | Type | Description |
---|---|---|
val |
string | number | 金额 |
n |
number | 保留小数位 |
prefix |
string | 前缀单位 |
Returns:
- Type
- string
(static) reverse(str) → {number}
金额格式转换成数字类型
Parameters:
Name | Type | Description |
---|---|---|
str |
string | 金额 |
Returns:
- Type
- number