From 1afe79068ae3a868e2bd7045f94f23ad22216a9c Mon Sep 17 00:00:00 2001 From: zhengkunwang223 <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 31 Aug 2022 18:03:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=BC=B9=E5=87=BA=E6=A1=86=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/file-list/index.vue | 119 ++++++++++++++++++ .../views/file-management/compress/index.vue | 9 +- .../views/file-management/create/index.vue | 13 +- .../file-management/decompress/index.vue | 9 +- 4 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 frontend/src/components/file-list/index.vue 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 @@ + + + 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 @@ - + +