migrate income&expense overview card and monthly income&expense card to composition API and typescript

This commit is contained in:
MaysWind
2025-01-12 02:10:40 +08:00
parent 9bbe4d2dcf
commit 5cacfc8daf
6 changed files with 512 additions and 275 deletions
+5 -1
View File
@@ -3,7 +3,11 @@ import { ALL_CURRENCIES, DEFAULT_CURRENCY_SYMBOL } from '@/consts/currency.ts';
import { isString, isNumber } from './common.ts';
export function getCurrencyFraction(currencyCode: string): number | undefined {
export function getCurrencyFraction(currencyCode?: string): number | undefined {
if (!currencyCode) {
return undefined;
}
const currencyInfo = ALL_CURRENCIES[currencyCode];
return currencyInfo?.fraction;
}