code refactor

This commit is contained in:
MaysWind
2025-01-18 22:45:16 +08:00
parent 20e95e35aa
commit c675057ab1
17 changed files with 58 additions and 68 deletions
+10 -10
View File
@@ -74,16 +74,6 @@ import { useI18nUIComponents } from '@/lib/ui/mobile.ts';
import { ALL_CURRENCIES } from '@/consts/currency.ts';
import { isString, isNumber, removeAll } from '@/lib/common.ts';
const {
tt,
getCurrentDecimalSeparator,
getCurrentDigitGroupingSymbol,
appendDigitGroupingSymbol,
parseAmount,
formatAmount
} = useI18n();
const { showToast } = useI18nUIComponents();
const props = defineProps<{
modelValue: number | string;
minValue?: number;
@@ -97,6 +87,16 @@ const emit = defineEmits<{
(e: 'update:show', value: boolean): void;
}>();
const {
tt,
getCurrentDecimalSeparator,
getCurrentDigitGroupingSymbol,
appendDigitGroupingSymbol,
parseAmount,
formatAmount
} = useI18n();
const { showToast } = useI18nUIComponents();
const previousValue = ref<string>('');
const currentSymbol = ref<string>('');
const currentValue = ref<string>(getStringValue(props.modelValue));