fix(client): update action initializer

This commit is contained in:
chenos 2022-02-20 01:37:47 +08:00
parent 000587380b
commit ab78655004

View File

@ -168,10 +168,50 @@ export const TableRecordActionInitializer = observer((props: any) => {
properties: { properties: {
drawer: { drawer: {
type: 'void', type: 'void',
'x-decorator': 'Form',
'x-decorator-props': {
useValues: '{{ cm.useValuesFromRecord }}',
},
'x-component': 'Action.Drawer', 'x-component': 'Action.Drawer',
title: '{{ t("Edit record") }}', title: '{{ t("Edit record") }}',
properties: {
grid: {
type: 'void',
'x-component': 'Grid',
'x-item-initializer': 'FormItemInitializer',
properties: {}, properties: {},
}, },
footer: {
type: 'void',
'x-component': 'Action.Drawer.Footer',
properties: {
actions: {
type: 'void',
// 'x-action-initializer': 'DrawerForm',
'x-component': 'ActionBar',
'x-component-props': {},
properties: {
action1: {
title: '{{ t("Cancel") }}',
'x-component': 'Action',
'x-component-props': {
useAction: '{{ cm.useCancelAction }}',
},
},
action2: {
title: '{{ t("Submit") }}',
'x-component': 'Action',
'x-component-props': {
type: 'primary',
useAction: '{{ cm.useUpdateAction }}',
},
},
},
},
},
},
},
},
}, },
}, },
}, },