mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
feat: add secondary confirmation and refresh functionality to DeleteActionModel
This commit is contained in:
parent
2ff0bae9d0
commit
71723be793
@ -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.');
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user