From dcf92f701895c7f0bf6e38638b5797b5d0504311 Mon Sep 17 00:00:00 2001 From: somnetsak123 Date: Mon, 4 Dec 2023 16:41:10 +0700 Subject: [PATCH] refactor: add nameId FileItemAction --- Services/client/src/components/FileItem.vue | 19 +++++++++++-------- .../client/src/components/FileItemAction.vue | 10 +++++++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Services/client/src/components/FileItem.vue b/Services/client/src/components/FileItem.vue index 128d41e..7eafdf0 100644 --- a/Services/client/src/components/FileItem.vue +++ b/Services/client/src/components/FileItem.vue @@ -19,9 +19,8 @@ const props = withDefaults( ) const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const const { getFileInfo } = useFileInfoStore() -const { currentFolder, currentFile, currentDept, currentPath } = storeToRefs( - useTreeDataStore() -) +const { currentFolder, currentFile, currentDept, currentPath } = + storeToRefs(useTreeDataStore()) const { createFolder, editFolder, @@ -38,8 +37,8 @@ const currentIcon = computed(() => currentDept.value === 0 ? 'mdi-file-cabinet' : currentDept.value === 1 - ? 'inbox' - : 'o_folder_open', + ? 'inbox' + : 'o_folder_open', ) const dialogDeleteState = ref(false) @@ -184,7 +183,10 @@ async function submitFileForm( {{ DEPT_NAME[currentDept] }}
-
+
@@ -289,7 +291,7 @@ async function submitFileForm( เอกสาร
-
+
defineEmits(['edit', 'delete']) + +const props = + defineProps<{ + nameId: string + + }>() + +