Files
certd/packages/ui/certd-client/src/utils/util.amount.ts
T
2024-12-26 01:01:28 +08:00

10 lines
210 B
TypeScript

export const amountUtils = {
toCent(amount: number): number {
return parseInt((amount * 100).toFixed(0));
},
toYuan(amount: number): number {
return parseFloat((amount / 100).toFixed(2));
}
};