mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 17:54:30 +08:00
code refactor
This commit is contained in:
@@ -143,10 +143,6 @@ const showState = ref<boolean>(false);
|
|||||||
let resolveFunc: ((value: TransactionCategoryEditRespose) => void) | null = null;
|
let resolveFunc: ((value: TransactionCategoryEditRespose) => void) | null = null;
|
||||||
let rejectFunc: ((reason?: unknown) => void) | null = null;
|
let rejectFunc: ((reason?: unknown) => void) | null = null;
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open
|
|
||||||
});
|
|
||||||
|
|
||||||
function open(options: { id?: string; parentId?: string; type?: CategoryType; currentCategory?: TransactionCategory }): Promise<TransactionCategoryEditRespose> {
|
function open(options: { id?: string; parentId?: string; type?: CategoryType; currentCategory?: TransactionCategory }): Promise<TransactionCategoryEditRespose> {
|
||||||
showState.value = true;
|
showState.value = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@@ -239,4 +235,8 @@ function cancel(): void {
|
|||||||
rejectFunc?.();
|
rejectFunc?.();
|
||||||
showState.value = false;
|
showState.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user