tachybase_todo/packages/client/src/schema-initializer/Initializers/PopupFormActionInitializers.tsx

40 lines
1010 B
TypeScript
Raw Normal View History

2022-02-22 11:17:24 +08:00
// 弹窗表单的操作配置
export const PopupFormActionInitializers = {
title: "{{t('Configure actions')}}",
items: [
{
type: 'itemGroup',
title: "{{t('Enable actions')}}",
children: [
{
type: 'item',
title: "{{t('Submit')}}",
component: 'ActionInitializer',
schema: {
title: '{{ t("Submit") }}',
'x-action': 'submit',
'x-component': 'Action',
'x-component-props': {
type: 'primary',
useAction: '{{ cm.useCreateAction }}',
},
},
},
{
type: 'item',
title: "{{t('Cancel')}}",
component: 'ActionInitializer',
schema: {
title: '{{ t("Cancel") }}',
'x-action': 'cancel',
'x-component': 'Action',
'x-component-props': {
useAction: '{{ cm.useCancelAction }}',
},
},
},
],
},
],
};