From 05fd0f912fc3b441effad9ae397a497a26eb443c Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Wed, 17 Sep 2025 16:15:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=89=A9=E5=B1=95=E5=90=8D=E5=B8=B8=E9=87=8F?= =?UTF-8?q?=E5=92=8C=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC=E5=88=97=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 `constants.ts` 中添加图像、视频和文档的文件扩展名常量 - 更新 `add-raw-material-drawer/index.vue` 和 `table/index.vue` 组件,引入新的文件扩展名常量 - 在 `table/index.vue` 中新增“标签”列,并优化“名称”列的宽度和图标显示逻辑 --- .../add-raw-material-drawer/index.vue | 17 +++++------ .../raw-material/components/table/index.vue | 28 ++++++++++++++----- .../components/raw-material/constants.ts | 13 +++++++-- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/src/views/material-center/components/raw-material/components/add-raw-material-drawer/index.vue b/src/views/material-center/components/raw-material/components/add-raw-material-drawer/index.vue index 98135a3..d29e439 100644 --- a/src/views/material-center/components/raw-material/components/add-raw-material-drawer/index.vue +++ b/src/views/material-center/components/raw-material/components/add-raw-material-drawer/index.vue @@ -5,21 +5,22 @@ const { Column } = Table; const { TextArea } = Input; const { Option } = Select; -import CommonSelect from '@/components/common-select'; +// import CommonSelect from '@/components/common-select'; import ImgLazyLoad from '@/components/img-lazy-load'; -import TextOverTips from '@/components/text-over-tips'; +// import TextOverTips from '@/components/text-over-tips'; +import axios from 'axios'; import { formatFileSize, getVideoInfo, getFileExtension } from '@/utils/tools'; import { getRawMaterialTagsList, postBatchRawMaterial, posRawMaterialTags } from '@/api/all/generationWorkshop'; import { getFilePreSignedUrl } from '@/api/all/common'; +import { + imageExtensions, + videoExtensions, + documentExtensions, +} from '@/views/material-center/components/raw-material/constants'; import icon1 from '@/assets/img/media-account/icon-delete.png'; import icon2 from '../../img/icon-no-text.png'; -import axios from 'axios'; - -const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.bmp']; -const videoExtensions = ['.mp4', '.mov', '.avi', '.flv', '.wmv', '.m4v']; -const documentExtensions = ['.txt', '.doc', '.docx', '.pdf', '.xls', '.xlsx']; enum EnumUploadStatus { done = 'done', @@ -319,7 +320,7 @@ export default defineComponent({ title="文件名称" dataIndex="name" key="name" - width={385} + width={380} ellipsis={true} customRender={({ text, record }) => { return ( diff --git a/src/views/material-center/components/raw-material/components/table/index.vue b/src/views/material-center/components/raw-material/components/table/index.vue index 82843bc..2e6288a 100644 --- a/src/views/material-center/components/raw-material/components/table/index.vue +++ b/src/views/material-center/components/raw-material/components/table/index.vue @@ -33,8 +33,13 @@