Files
ipms-sjy/yudao-ui-admin-vue3/src/views/infra/fileList/fileList.data.ts

47 lines
929 B
TypeScript
Raw Normal View History

2022-07-18 19:06:37 +08:00
import { reactive } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
2022-11-22 16:41:43 +08:00
import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
2022-07-18 19:06:37 +08:00
const { t } = useI18n() // 国际化
// CrudSchema
2022-11-22 16:41:43 +08:00
const crudSchemas = reactive<VxeCrudSchema>({
primaryKey: 'id',
primaryType: 'seq',
action: true,
columns: [
{
title: '文件名',
field: 'path',
search: {
show: true
}
},
2022-11-22 16:41:43 +08:00
{
title: 'URL',
field: 'url',
table: {
cellRender: {
name: 'XImg'
}
}
2022-07-18 19:06:37 +08:00
},
2022-11-22 16:41:43 +08:00
{
title: '文件类型',
field: 'type'
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
isForm: false,
search: {
show: true,
itemRender: {
name: 'XDataTimePicker'
}
}
2022-07-18 19:06:37 +08:00
}
2022-11-22 16:41:43 +08:00
]
})
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)