code refactor

This commit is contained in:
MaysWind
2025-02-09 21:26:02 +08:00
parent e665fac956
commit a21bc7aad7
3 changed files with 8 additions and 4 deletions
+2 -1
View File
@@ -37,12 +37,13 @@ import { useI18n } from '@/locales/helpers.ts';
import type { CurrencyPrependAndAppendText } from '@/core/currency.ts';
import { TRANSACTION_MIN_AMOUNT, TRANSACTION_MAX_AMOUNT } from '@/consts/transaction.ts';
import { removeAll } from '@/lib/common.ts';
import type { ComponentDensity } from '@/lib/ui/desktop.ts';
import logger from '@/lib/logger.ts';
const props = defineProps<{
class?: string;
color?: string;
density?: string;
density?: ComponentDensity;
currency: string;
showCurrency?: boolean;
label?: string;
+3 -3
View File
@@ -91,7 +91,7 @@ import {
getItemByKeyValue,
getNameByKeyValue
} from '@/lib/common.ts';
import { scrollToSelectedItem } from '@/lib/ui/desktop.ts';
import { type ComponentDensity, type InputVariant, scrollToSelectedItem } from '@/lib/ui/desktop.ts';
import {
mdiChevronRight,
@@ -99,8 +99,8 @@ import {
} from '@mdi/js';
interface DesktopTwoColumnListItemSelectionProps extends CommonTwoColumnListItemSelectionProps {
density?: string;
variant?: string;
density?: ComponentDensity;
variant?: InputVariant;
disabled?: boolean;
readonly?: boolean;
label?: string;
+3
View File
@@ -1,3 +1,6 @@
export type ComponentDensity = 'default' | 'comfortable' | 'compact';
export type InputVariant = 'filled' | 'underlined' | 'outlined' | 'plain' | 'solo' | 'solo-inverted' | 'solo-filled';
export function getOuterHeight(element: HTMLElement | null): number {
if (!element) {
return 0;