diff --git a/frontend/src/components/file-list/index.vue b/frontend/src/components/file-list/index.vue new file mode 100644 index 000000000..b5222bc81 --- /dev/null +++ b/frontend/src/components/file-list/index.vue @@ -0,0 +1,119 @@ + + + + + + + + root + {{ item }} + + + + + + + + + + + + + + + {{ row.name }} + + + + + + + + diff --git a/frontend/src/views/file-management/compress/index.vue b/frontend/src/views/file-management/compress/index.vue index 57b4f5720..d234170af 100644 --- a/frontend/src/views/file-management/compress/index.vue +++ b/frontend/src/views/file-management/compress/index.vue @@ -12,7 +12,9 @@ > - + + @@ -35,6 +37,7 @@ import { ElMessage, FormInstance, FormRules } from 'element-plus'; import { Rules } from '@/global/form-rues'; import { CompressExtention, CompressType } from '@/enums/files'; import { CompressFile } from '@/api/modules/files'; +import FileList from '@/components/file-list/index.vue'; const props = defineProps({ open: { @@ -87,6 +90,10 @@ const handleClose = () => { em('close', open); }; +const getLinkPath = (path: string) => { + form.value.dst = path; +}; + const onOpen = () => { form.value = { dst: dst.value, diff --git a/frontend/src/views/file-management/create/index.vue b/frontend/src/views/file-management/create/index.vue index d4dae2230..322949dda 100644 --- a/frontend/src/views/file-management/create/index.vue +++ b/frontend/src/views/file-management/create/index.vue @@ -20,8 +20,12 @@ - + + + + + + @@ -47,6 +51,7 @@ import { CreateFile } from '@/api/modules/files'; import i18n from '@/lang'; import FileRole from '@/components/file-role/index.vue'; import { Rules } from '@/global/form-rues'; +import FileList from '@/components/file-list/index.vue'; const fileForm = ref(); let loading = ref(false); @@ -84,6 +89,10 @@ let getPath = computed(() => { } }); +const getLinkPath = (path: string) => { + addForm.linkPath = path; +}; + const submit = async (formEl: FormInstance | undefined) => { if (!formEl) return; await formEl.validate((valid) => { diff --git a/frontend/src/views/file-management/decompress/index.vue b/frontend/src/views/file-management/decompress/index.vue index 5d0b9f658..52c825387 100644 --- a/frontend/src/views/file-management/decompress/index.vue +++ b/frontend/src/views/file-management/decompress/index.vue @@ -12,7 +12,9 @@ - + + @@ -32,6 +34,7 @@ import { ElMessage, FormInstance, FormRules } from 'element-plus'; import { Rules } from '@/global/form-rues'; import { DeCompressFile } from '@/api/modules/files'; import { Mimetypes } from '@/global/mimetype'; +import FileList from '@/components/file-list/index.vue'; const props = defineProps({ open: { @@ -79,6 +82,10 @@ const getFileType = (mime: string): string => { } }; +const getLinkPath = (path: string) => { + form.value.dst = path; +}; + const onOpen = () => { form.value = { dst: dst.value,