附件管理添加预览

This commit is contained in:
阿辉
2024-12-02 15:06:35 +08:00
parent d0f562b6ed
commit 547cc30818
2 changed files with 134 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
buttons: {
add: {
show: true,
// click: () => context.openAddHandle?.()
click: () => context.openAddHandle?.()
},
},
},
@@ -43,6 +43,17 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
editRequest,
delRequest,
},
tabs: {
show: true,
name: 'file_type',
type: '',
options: [
{ value: 0, label: '图片' },
{ value: 1, label: '视频' },
{ value: 2, label: '音频' },
{ value: 3, label: '其他' },
]
},
rowHandle: {
//固定右侧
fixed: 'right',
@@ -118,6 +129,16 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
},
},
},
preview: {
title: '预览',
column: {
minWidth: 120,
align: 'center'
},
form: {
show: false
}
},
url: {
title: '文件地址',
type: 'file-uploader',
@@ -145,10 +166,6 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
type: 'input',
form: {
show: false,
component: {
placeholder: '请输入文件名称',
clearable: true
},
},
column: {
minWidth: 160
@@ -203,6 +220,15 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
show: true
}
},
create_datetime: {
title: '创建时间',
column: {
minWidth: 160
},
form: {
show: false
}
},
// fileselectortest: {
// title: '文件选择器测试',
// type: 'file-selector',