feat: 添加文件类型扩展名常量和优化表格列显示

- 在 `constants.ts` 中添加图像、视频和文档的文件扩展名常量
- 更新 `add-raw-material-drawer/index.vue` 和 `table/index.vue` 组件,引入新的文件扩展名常量
- 在 `table/index.vue` 中新增“标签”列,并优化“名称”列的宽度和图标显示逻辑
This commit is contained in:
rd
2025-09-17 16:15:20 +08:00
parent bf7963234e
commit 05fd0f912f
3 changed files with 41 additions and 17 deletions

View File

@ -5,6 +5,10 @@ export enum RawMaterialType {
Text = 2,
}
export const imageExtensions = ['.jpg', '.jpeg', '.png', '.gif', '.webp', '.bmp'];
export const videoExtensions = ['.mp4', '.mov', '.avi', '.flv', '.wmv', '.m4v'];
export const documentExtensions = ['.txt', '.doc', '.docx', '.pdf', '.xls', '.xlsx'];
export const TABS_LIST = [
{
label: '全部',
@ -55,6 +59,11 @@ export const TABLE_COLUMNS = [
dataIndex: 'type',
width: 80,
},
{
title: '标签',
dataIndex: 'tags',
width: 190,
},
{
title: '来源',
dataIndex: 'origin',
@ -83,5 +92,5 @@ export const TABLE_COLUMNS = [
dataIndex: 'operation',
width: 120,
fixed: 'right',
}
]
},
];