mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
code refactor
This commit is contained in:
@@ -37,12 +37,13 @@ import { useI18n } from '@/locales/helpers.ts';
|
|||||||
import type { CurrencyPrependAndAppendText } from '@/core/currency.ts';
|
import type { CurrencyPrependAndAppendText } from '@/core/currency.ts';
|
||||||
import { TRANSACTION_MIN_AMOUNT, TRANSACTION_MAX_AMOUNT } from '@/consts/transaction.ts';
|
import { TRANSACTION_MIN_AMOUNT, TRANSACTION_MAX_AMOUNT } from '@/consts/transaction.ts';
|
||||||
import { removeAll } from '@/lib/common.ts';
|
import { removeAll } from '@/lib/common.ts';
|
||||||
|
import type { ComponentDensity } from '@/lib/ui/desktop.ts';
|
||||||
import logger from '@/lib/logger.ts';
|
import logger from '@/lib/logger.ts';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
class?: string;
|
class?: string;
|
||||||
color?: string;
|
color?: string;
|
||||||
density?: string;
|
density?: ComponentDensity;
|
||||||
currency: string;
|
currency: string;
|
||||||
showCurrency?: boolean;
|
showCurrency?: boolean;
|
||||||
label?: string;
|
label?: string;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ import {
|
|||||||
getItemByKeyValue,
|
getItemByKeyValue,
|
||||||
getNameByKeyValue
|
getNameByKeyValue
|
||||||
} from '@/lib/common.ts';
|
} from '@/lib/common.ts';
|
||||||
import { scrollToSelectedItem } from '@/lib/ui/desktop.ts';
|
import { type ComponentDensity, type InputVariant, scrollToSelectedItem } from '@/lib/ui/desktop.ts';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
mdiChevronRight,
|
mdiChevronRight,
|
||||||
@@ -99,8 +99,8 @@ import {
|
|||||||
} from '@mdi/js';
|
} from '@mdi/js';
|
||||||
|
|
||||||
interface DesktopTwoColumnListItemSelectionProps extends CommonTwoColumnListItemSelectionProps {
|
interface DesktopTwoColumnListItemSelectionProps extends CommonTwoColumnListItemSelectionProps {
|
||||||
density?: string;
|
density?: ComponentDensity;
|
||||||
variant?: string;
|
variant?: InputVariant;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
label?: string;
|
label?: string;
|
||||||
|
|||||||
@@ -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 {
|
export function getOuterHeight(element: HTMLElement | null): number {
|
||||||
if (!element) {
|
if (!element) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user