feat: 系统设置-交互行为优化. 系统设置区块,配置操作,提交按钮,初始化时,支持设置提交成功后的回调

This commit is contained in:
bai.jingfeng 2024-04-02 20:05:56 +08:00
parent 67d6b2d5f4
commit 953e13fce7
2 changed files with 10 additions and 0 deletions

View File

@ -17,6 +17,11 @@ export const UpdateSubmitActionInitializer = (props) => {
}, },
'x-action-settings': { 'x-action-settings': {
triggerWorkflows: [], triggerWorkflows: [],
onSuccess: {
manualClose: false,
redirecting: false,
successMessage: '{{t("Updated successfully")}}',
},
}, },
}; };
return <ActionInitializer {...props} schema={schema} />; return <ActionInitializer {...props} schema={schema} />;

View File

@ -3,6 +3,7 @@ import { isValid } from '@nocobase/schema';
import { isInitializersSame, useSchemaToolbar } from '../../../application'; import { isInitializersSame, useSchemaToolbar } from '../../../application';
import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings'; import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
import { import {
AfterSuccess,
ButtonEditor, ButtonEditor,
RemoveButton, RemoveButton,
SecondConFirm, SecondConFirm,
@ -25,6 +26,10 @@ export const updateSubmitActionSettings = new SchemaSettings({
name: 'secondConfirmation', name: 'secondConfirmation',
Component: SecondConFirm, Component: SecondConFirm,
}, },
{
name: 'afterSuccessfulSubmission',
Component: AfterSuccess,
},
{ {
name: 'workflowConfig', name: 'workflowConfig',
Component: WorkflowConfig, Component: WorkflowConfig,