feat: add create/update/destroy action logs views

This commit is contained in:
chenos 2021-03-18 22:36:05 +08:00
parent 808e3657e0
commit baae04a6dd

View File

@ -131,10 +131,85 @@ export default {
details: ['descriptions'], details: ['descriptions'],
sort: ['-created_at'], sort: ['-created_at'],
}, },
{
developerMode: true,
type: 'table',
name: 'create',
title: '新增数据',
labelField: 'created_at',
actions: [
{
name: 'filter',
type: 'filter',
title: '过滤',
},
],
fields: ['created_at', 'user', 'collection', 'type', 'index'],
detailsOpenMode: 'drawer', // window
details: ['descriptions'],
filter: {
and: [
{
type: 'create',
}
],
},
sort: ['-created_at'],
},
{
developerMode: true,
type: 'table',
name: 'update',
title: '更新数据',
labelField: 'created_at',
actions: [
{
name: 'filter',
type: 'filter',
title: '过滤',
},
],
fields: ['created_at', 'user', 'collection', 'type', 'index'],
detailsOpenMode: 'drawer', // window
details: ['descriptions'],
filter: {
and: [
{
type: 'update',
}
],
},
sort: ['-created_at'],
},
{
developerMode: true,
type: 'table',
name: 'destroy',
title: '删除数据',
labelField: 'created_at',
actions: [
{
name: 'filter',
type: 'filter',
title: '过滤',
},
],
fields: ['created_at', 'user', 'collection', 'type', 'index'],
detailsOpenMode: 'drawer', // window
details: ['descriptions'],
filter: {
and: [
{
type: 'destroy',
}
],
},
sort: ['-created_at'],
},
{ {
type: 'table', type: 'table',
name: 'table2', name: 'table2',
title: '表格视图', title: '操作日志列表',
labelField: 'created_at', labelField: 'created_at',
actions: [ actions: [
{ {