From 6ef42a9303919e79f2b73e60eb1b026f351e6c92 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Thu, 16 Jan 2025 00:25:50 +0800 Subject: [PATCH] code refactor --- src/components/desktop/AmountInput.vue | 26 ++++++++++---------- src/components/desktop/ConfirmDialog.vue | 8 +++--- src/components/desktop/StepsBar.vue | 8 +++--- src/components/mobile/InformationSheet.vue | 12 ++++----- src/components/mobile/PasscodeInputSheet.vue | 12 ++++----- src/components/mobile/PasswordInputSheet.vue | 14 +++++------ src/components/mobile/PinCodeInputSheet.vue | 12 ++++----- 7 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/components/desktop/AmountInput.vue b/src/components/desktop/AmountInput.vue index b0a0cd1d..6f23f203 100644 --- a/src/components/desktop/AmountInput.vue +++ b/src/components/desktop/AmountInput.vue @@ -49,19 +49,19 @@ const { } = useI18n(); const props = defineProps<{ - class?: string, - color?: string, - density?: string, - currency: string, - showCurrency?: boolean, - label?: string, - placeholder?: string, - persistentPlaceholder?: boolean, - disabled?: boolean, - readonly?: boolean, - hide?: boolean, - enableRules?: boolean, - modelValue: number + class?: string; + color?: string; + density?: string; + currency: string; + showCurrency?: boolean; + label?: string; + placeholder?: string; + persistentPlaceholder?: boolean; + disabled?: boolean; + readonly?: boolean; + hide?: boolean; + enableRules?: boolean; + modelValue: number; }>(); const emit = defineEmits<{ diff --git a/src/components/desktop/ConfirmDialog.vue b/src/components/desktop/ConfirmDialog.vue index 63c3ae88..c5b9a164 100644 --- a/src/components/desktop/ConfirmDialog.vue +++ b/src/components/desktop/ConfirmDialog.vue @@ -22,10 +22,10 @@ import { useI18n } from '@/locales/helpers.ts'; import { isString, isObject } from '@/lib/common.ts'; const props = defineProps<{ - show?: boolean - color?: string - title?: string - text?: string + show?: boolean; + color?: string; + title?: string; + text?: string; }>(); const emit = defineEmits<{ diff --git a/src/components/desktop/StepsBar.vue b/src/components/desktop/StepsBar.vue index a32276db..8fd7e619 100644 --- a/src/components/desktop/StepsBar.vue +++ b/src/components/desktop/StepsBar.vue @@ -53,10 +53,10 @@ interface StepBarItem { } const props = defineProps<{ - steps: StepBarItem[] - currentStep: string - clickable?: string | boolean - minWidth: string | number + steps: StepBarItem[]; + currentStep: string; + clickable?: string | boolean; + minWidth: string | number; }>(); const emit = defineEmits<{ diff --git a/src/components/mobile/InformationSheet.vue b/src/components/mobile/InformationSheet.vue index b81b6019..0b58653a 100644 --- a/src/components/mobile/InformationSheet.vue +++ b/src/components/mobile/InformationSheet.vue @@ -32,12 +32,12 @@ import { useI18n } from '@/locales/helpers.ts'; import { ClipboardHolder } from '@/lib/clipboard.ts'; const props = defineProps<{ - title?: string - hint?: string - information: string - rowCount: number - enableCopy?: boolean - show: boolean + title?: string; + hint?: string; + information: string; + rowCount: number; + enableCopy?: boolean; + show: boolean; }>(); const emit = defineEmits<{ diff --git a/src/components/mobile/PasscodeInputSheet.vue b/src/components/mobile/PasscodeInputSheet.vue index 20df2bb5..291ac82f 100644 --- a/src/components/mobile/PasscodeInputSheet.vue +++ b/src/components/mobile/PasscodeInputSheet.vue @@ -42,12 +42,12 @@ import { ref } from 'vue'; import { useI18n } from '@/locales/helpers.ts'; const props = defineProps<{ - modelValue: string - title?: string - hint?: string - confirmDisabled?: boolean - cancelDisabled?: boolean - show: boolean + modelValue: string; + title?: string; + hint?: string; + confirmDisabled?: boolean; + cancelDisabled?: boolean; + show: boolean; }>(); const emit = defineEmits<{ diff --git a/src/components/mobile/PasswordInputSheet.vue b/src/components/mobile/PasswordInputSheet.vue index 9513fb4d..4ec0f7d2 100644 --- a/src/components/mobile/PasswordInputSheet.vue +++ b/src/components/mobile/PasswordInputSheet.vue @@ -43,13 +43,13 @@ import { ref } from 'vue'; import { useI18n } from '@/locales/helpers.ts'; const props = defineProps<{ - modelValue: string - title?: string - hint?: string - color?: string - confirmDisabled?: boolean - cancelDisabled?: boolean - show: boolean + modelValue: string; + title?: string; + hint?: string; + color?: string; + confirmDisabled?: boolean; + cancelDisabled?: boolean; + show: boolean; }>(); const emit = defineEmits<{ diff --git a/src/components/mobile/PinCodeInputSheet.vue b/src/components/mobile/PinCodeInputSheet.vue index 63595d5a..f0e79419 100644 --- a/src/components/mobile/PinCodeInputSheet.vue +++ b/src/components/mobile/PinCodeInputSheet.vue @@ -32,12 +32,12 @@ import { ref, computed } from 'vue'; import { useI18n } from '@/locales/helpers.ts'; const props = defineProps<{ - modelValue: string - title?: string - hint?: string - confirmDisabled?: boolean - cancelDisabled?: boolean - show: boolean + modelValue: string; + title?: string; + hint?: string; + confirmDisabled?: boolean; + cancelDisabled?: boolean; + show: boolean; }>(); const emit = defineEmits<{