From cd9bd9940cb24b3895ad580094edb744812547ab Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Sun, 4 Dec 2022 15:29:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/modules/zh.ts | 2 + .../host/file-management/detail/index.vue | 50 +++++++++++++++++++ .../src/views/host/file-management/index.vue | 16 ++++-- 3 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 frontend/src/views/host/file-management/detail/index.vue diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 9523e74c5..20bc3f089 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -629,6 +629,8 @@ export default { uploadSuccess: '上传成功!', downloadProcess: '下载进度', downloading: '正在下载...', + infoDetail: '文件属性', + type: '类型', }, setting: { all: '全部', diff --git a/frontend/src/views/host/file-management/detail/index.vue b/frontend/src/views/host/file-management/detail/index.vue new file mode 100644 index 000000000..ce0777e9f --- /dev/null +++ b/frontend/src/views/host/file-management/detail/index.vue @@ -0,0 +1,50 @@ + + + diff --git a/frontend/src/views/host/file-management/index.vue b/frontend/src/views/host/file-management/index.vue index b8a966470..494ba7006 100644 --- a/frontend/src/views/host/file-management/index.vue +++ b/frontend/src/views/host/file-management/index.vue @@ -170,6 +170,7 @@ @close="closeDownload" > + @@ -205,6 +206,7 @@ import Move from './move/index.vue'; import Download from './download/index.vue'; import { Mimetypes } from '@/global/mimetype'; import Process from './process/index.vue'; +import Detail from './detail/index.vue'; const data = ref(); let selects = ref([]); @@ -227,6 +229,7 @@ const wgetPage = reactive({ open: false, path: '' }); const movePage = reactive({ open: false, oldPaths: [''], type: '' }); const downloadPage = reactive({ open: false, paths: [''], name: '' }); const processPage = reactive({ open: false }); +const detailRef = ref(); const defaultProps = { children: 'children', @@ -522,12 +525,10 @@ const quickSave = (content: string) => { }); }; -onMounted(() => { - search(); -}); +const openDetail = (row: File.File) => { + detailRef.value.acceptParams({ path: row.path }); +}; -//TODO button增加v-if判断 -//openDeCompress 增加是否可以解压判断 const buttons = [ { label: i18n.global.t('file.open'), @@ -560,8 +561,13 @@ const buttons = [ }, { label: i18n.global.t('file.info'), + click: openDetail, }, ]; + +onMounted(() => { + search(); +});