feat: add secondary confirmation and refresh functionality to DeleteActionModel

This commit is contained in:
Zeke Zhang 2025-06-19 06:55:44 +08:00
parent 2ff0bae9d0
commit 71723be793

View File

@ -25,7 +25,7 @@ DeleteActionModel.registerFlow({
},
steps: {
secondaryConfirmation: {
title: 'Secondary confirmation',
title: '二次确认',
uiSchema: {
enable: {
type: 'boolean',
@ -80,5 +80,27 @@ DeleteActionModel.registerFlow({
await ctx.extra.currentResource.refresh();
},
},
refresh: {
title: '执行后刷新数据',
uiSchema: {
enable: {
type: 'boolean',
title: 'Enable refresh',
'x-decorator': 'FormItem',
'x-component': 'Checkbox',
},
},
defaultParams(ctx) {
return {
enable: true,
};
},
async handler(ctx, params) {
if (params.enable) {
await ctx.extra.currentResource.refresh();
ctx.globals.message.success('Data refreshed successfully.');
}
},
},
},
});