tachybase_todo/packages/client/src/schema-initializer/buttons/TableActionInitializers.tsx
chenos 271e91b452
feat: improve acl module (#283)
* feat: improve code

* fix: rowKey

* fix: ctx.state.currentUser

* fix: improve code

* fix: menu item permission

* fix: x-acl-action

* fix: skipScopeCheck

* feat: relationship resource permission

* fix: createdById
2022-04-12 12:02:58 +08:00

49 lines
1.1 KiB
TypeScript

// 表格操作配置
export const TableActionInitializers = {
title: "{{t('Configure actions')}}",
icon: 'SettingOutlined',
style: {
marginLeft: 8,
},
items: [
{
type: 'itemGroup',
title: "{{t('Enable actions')}}",
children: [
{
type: 'item',
title: "{{t('Filter')}}",
component: 'FilterActionInitializer',
schema: {
'x-align': 'left',
},
},
{
type: 'item',
title: "{{t('Add new')}}",
component: 'CreateActionInitializer',
schema: {
'x-align': 'right',
'x-decorator': 'ACLActionProvider',
'x-acl-action-props': {
skipScopeCheck: true,
},
},
},
{
type: 'item',
title: "{{t('Delete')}}",
component: 'BulkDestroyActionInitializer',
schema: {
'x-align': 'right',
'x-decorator': 'ACLActionProvider',
'x-acl-action-props': {
skipScopeCheck: true,
},
},
},
],
},
],
};