mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
migrate income&expense overview card and monthly income&expense card to composition API and typescript
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export function getSystemTheme(): ThemeType {
|
||||
}
|
||||
}
|
||||
|
||||
export function getExpenseAndIncomeAmountColor(expenseAmountColorType: number, incomeAmountColorType: number, isDarkMode: boolean): AmountColor {
|
||||
export function getExpenseAndIncomeAmountColor(expenseAmountColorType: number, incomeAmountColorType: number, isDarkMode?: boolean): AmountColor {
|
||||
let expenseAmountColor = expenseAmountColorType ? PresetAmountColor.valueOf(expenseAmountColorType) : null;
|
||||
let incomeAmountColor = incomeAmountColorType ? PresetAmountColor.valueOf(incomeAmountColorType) : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user