mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 01:34:24 +08:00
code refactor
This commit is contained in:
@@ -270,6 +270,13 @@ const icons = {
|
|||||||
tag: mdiPound
|
tag: mdiPound
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const { tt } = useI18n();
|
||||||
|
|
||||||
|
const transactionTagsStore = useTransactionTagsStore();
|
||||||
|
|
||||||
|
const confirmDialog = useTemplateRef<ConfirmDialogType>('confirmDialog');
|
||||||
|
const snackbar = useTemplateRef<SnackBarType>('snackbar');
|
||||||
|
|
||||||
const newTag = ref<TransactionTag | null>(null);
|
const newTag = ref<TransactionTag | null>(null);
|
||||||
const editingTag = ref<TransactionTag>(TransactionTag.createNewTag());
|
const editingTag = ref<TransactionTag>(TransactionTag.createNewTag());
|
||||||
const loading = ref<boolean>(true);
|
const loading = ref<boolean>(true);
|
||||||
@@ -280,13 +287,6 @@ const tagRemoving = ref<Record<string, boolean>>({});
|
|||||||
const displayOrderModified = ref<boolean>(false);
|
const displayOrderModified = ref<boolean>(false);
|
||||||
const showHidden = ref<boolean>(false);
|
const showHidden = ref<boolean>(false);
|
||||||
|
|
||||||
const { tt } = useI18n();
|
|
||||||
|
|
||||||
const transactionTagsStore = useTransactionTagsStore();
|
|
||||||
|
|
||||||
const confirmDialog = useTemplateRef<ConfirmDialogType>('confirmDialog');
|
|
||||||
const snackbar = useTemplateRef<SnackBarType>('snackbar');
|
|
||||||
|
|
||||||
const tags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
const tags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
||||||
const noAvailableTag = computed<boolean>(() => isNoAvailableTag(tags.value, showHidden.value));
|
const noAvailableTag = computed<boolean>(() => isNoAvailableTag(tags.value, showHidden.value));
|
||||||
const availableTagCount = computed<number>(() => getAvailableTagCount(tags.value, showHidden.value));
|
const availableTagCount = computed<number>(() => getAvailableTagCount(tags.value, showHidden.value));
|
||||||
|
|||||||
@@ -164,6 +164,11 @@ const props = defineProps<{
|
|||||||
f7router: Router.Router;
|
f7router: Router.Router;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const { tt } = useI18n();
|
||||||
|
const { showToast, routeBackOnError } = useI18nUIComponents();
|
||||||
|
|
||||||
|
const transactionTagsStore = useTransactionTagsStore();
|
||||||
|
|
||||||
const newTag = ref<TransactionTag | null>(null);
|
const newTag = ref<TransactionTag | null>(null);
|
||||||
const editingTag = ref<TransactionTag>(TransactionTag.createNewTag());
|
const editingTag = ref<TransactionTag>(TransactionTag.createNewTag());
|
||||||
const loading = ref<boolean>(true);
|
const loading = ref<boolean>(true);
|
||||||
@@ -176,11 +181,6 @@ const showDeleteActionSheet = ref<boolean>(false);
|
|||||||
const displayOrderModified = ref<boolean>(false);
|
const displayOrderModified = ref<boolean>(false);
|
||||||
const displayOrderSaving = ref<boolean>(false);
|
const displayOrderSaving = ref<boolean>(false);
|
||||||
|
|
||||||
const { tt } = useI18n();
|
|
||||||
const { showToast, routeBackOnError } = useI18nUIComponents();
|
|
||||||
|
|
||||||
const transactionTagsStore = useTransactionTagsStore();
|
|
||||||
|
|
||||||
const tags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
const tags = computed<TransactionTag[]>(() => transactionTagsStore.allTransactionTags);
|
||||||
const firstShowingId = computed<string | null>(() => getFirstShowingId(tags.value, showHidden.value));
|
const firstShowingId = computed<string | null>(() => getFirstShowingId(tags.value, showHidden.value));
|
||||||
const lastShowingId = computed<string | null>(() => getLastShowingId(tags.value, showHidden.value));
|
const lastShowingId = computed<string | null>(() => getLastShowingId(tags.value, showHidden.value));
|
||||||
|
|||||||
Reference in New Issue
Block a user