fix: unintended import and format

This commit is contained in:
Methapon2001 2023-11-30 09:51:25 +07:00
parent 90fb775509
commit 5157bdce2e
No known key found for this signature in database
GPG key ID: 849924FEF46BD132

View file

@ -10,19 +10,17 @@ import FolderForm from './FolderForm.vue'
import UploadExistDialog from './UploadExistDialog.vue' import UploadExistDialog from './UploadExistDialog.vue'
import { useTreeDataStore } from '@/stores/tree-data' import { useTreeDataStore } from '@/stores/tree-data'
import { useFileInfoStore } from '@/stores/file-info-data' import { useFileInfoStore } from '@/stores/file-info-data'
import test from 'node:test'
const props = withDefaults( const props = withDefaults(
defineProps<{ action: boolean; viewMode: 'view_list' | 'view_module' }>(), defineProps<{ action: boolean; viewMode: 'view_list' | 'view_module' }>(),
{ {
action: false, action: false,
} },
) )
const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const const DEPT_NAME = ['ตู้เอกสาร', 'ลิ้นชัก', 'แฟ้ม', 'แฟ้มย่อย'] as const
const { getFileInfo, getFileNameFormat } = useFileInfoStore() const { getFileInfo, getFileNameFormat } = useFileInfoStore()
const { currentFolder, currentFile, currentDept, currentPath } = storeToRefs( const { currentFolder, currentFile, currentDept, currentPath } =
useTreeDataStore() storeToRefs(useTreeDataStore())
)
const { const {
createFolder, createFolder,
editFolder, editFolder,
@ -38,8 +36,8 @@ const currentIcon = computed(() =>
currentDept.value === 0 currentDept.value === 0
? 'mdi-file-cabinet' ? 'mdi-file-cabinet'
: currentDept.value === 1 : currentDept.value === 1
? 'inbox' ? 'inbox'
: 'o_folder_open' : 'o_folder_open',
) )
const dialogDeleteState = ref<boolean>(false) const dialogDeleteState = ref<boolean>(false)
@ -114,7 +112,7 @@ function triggerFileEdit(
keyword: string keyword: string
category: string category: string
}, },
pathname: string pathname: string,
) { ) {
fileFormState.value = true fileFormState.value = true
fileFormType.value = 'edit' fileFormType.value = 'edit'
@ -138,7 +136,7 @@ async function submitFileForm(
keyword: string keyword: string
category: string category: string
}, },
force = false force = false,
) { ) {
currentParam.value = value currentParam.value = value
@ -163,7 +161,7 @@ async function submitFileForm(
keyword: value.keyword, keyword: value.keyword,
category: value.category, category: value.category,
}, },
value.file value.file,
) )
} }
fileFormData.value = {} fileFormData.value = {}
@ -311,7 +309,7 @@ async function submitFileForm(
keyword: value.keyword.join(','), keyword: value.keyword.join(','),
category: value.category.join(','), category: value.category.join(','),
}, },
value.pathname value.pathname,
) )
" "
@delete="() => triggerFileDelete(value.pathname)" @delete="() => triggerFileDelete(value.pathname)"