fix: product decimal
This commit is contained in:
parent
ef49f374cd
commit
401dbab1ca
2 changed files with 45 additions and 7 deletions
|
|
@ -416,7 +416,8 @@ export async function waitAll<T extends Promise<any>[]>(arr: T) {
|
|||
}
|
||||
|
||||
export function commaInput(text: string): string {
|
||||
if (typeof text !== 'string') return '';
|
||||
if (typeof text !== 'string') return '0';
|
||||
if (!text) return '0';
|
||||
const num = text.replace(/,/gi, '');
|
||||
const numF = num.split(/(?=(?:\d{3})+$)/).join(',');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue