From f1313b1f1c08a5e10fe4e309e82c97f911d5505c Mon Sep 17 00:00:00 2001 From: dlarmor <121919810@qq.com> Date: Tue, 14 Mar 2023 10:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=EF=BC=9A=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=20->=20=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.ts | 3 +- src/locales/zh-CN.ts | 3 +- src/views/infra/file/form.vue | 82 ++++++++++ src/views/infra/file/index.vue | 162 ++++++++++++++++++++ src/views/infra/fileList/fileList.data.ts | 52 ------- src/views/infra/fileList/index.vue | 173 ---------------------- 6 files changed, 248 insertions(+), 227 deletions(-) create mode 100644 src/views/infra/file/form.vue create mode 100644 src/views/infra/file/index.vue delete mode 100644 src/views/infra/fileList/fileList.data.ts delete mode 100644 src/views/infra/fileList/index.vue diff --git a/src/locales/en.ts b/src/locales/en.ts index 1600a19f..4f4d4895 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -297,7 +297,8 @@ export default { typeCreate: 'Dict Type Create', typeUpdate: 'Dict Type Eidt', dataCreate: 'Dict Data Create', - dataUpdate: 'Dict Data Eidt' + dataUpdate: 'Dict Data Eidt', + fileUpload: 'File Upload' }, dialog: { dialog: 'Dialog', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 7c5742c4..6f46f1ab 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -297,7 +297,8 @@ export default { typeCreate: '字典类型新增', typeUpdate: '字典类型编辑', dataCreate: '字典数据新增', - dataUpdate: '字典数据编辑' + dataUpdate: '字典数据编辑', + fileUpload: '上传文件' }, dialog: { dialog: '弹窗', diff --git a/src/views/infra/file/form.vue b/src/views/infra/file/form.vue new file mode 100644 index 00000000..8550d440 --- /dev/null +++ b/src/views/infra/file/form.vue @@ -0,0 +1,82 @@ + + + + + 将文件拖到此处,或 点击上传 + + + 提示:仅允许导入 jpg、png、gif 格式文件! + + + + + + + + + + + + diff --git a/src/views/infra/file/index.vue b/src/views/infra/file/index.vue new file mode 100644 index 00000000..77beb3e5 --- /dev/null +++ b/src/views/infra/file/index.vue @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + 搜索 + 重置 + + 上传文件 + + + + + + + + + + + + + + + + + + 删除 + + + + + + + + + + + + diff --git a/src/views/infra/fileList/fileList.data.ts b/src/views/infra/fileList/fileList.data.ts deleted file mode 100644 index 29be6dae..00000000 --- a/src/views/infra/fileList/fileList.data.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'seq', - action: true, - columns: [ - { - title: '文件名', - field: 'name' - }, - { - title: '文件路径', - field: 'path', - isSearch: true - }, - { - title: 'URL', - field: 'url', - table: { - cellRender: { - name: 'XPreview' - } - } - }, - { - title: '文件大小', - field: 'size', - formatter: 'formatSize' - }, - { - title: '文件类型', - field: 'type', - isSearch: true - }, - { - title: t('common.createTime'), - field: 'createTime', - formatter: 'formatDate', - isForm: false, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/infra/fileList/index.vue b/src/views/infra/fileList/index.vue deleted file mode 100644 index cda8b68d..00000000 --- a/src/views/infra/fileList/index.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - {{ row.url }} - - - - - - - - - - - 将文件拖到此处,或点击上传 - - 请上传 .jpg, .png, .gif 标准格式文件 - - - - - - - - - - -