mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
feat: add refreshOnCompleteAction for data refresh functionality
This commit is contained in:
parent
0df2e5f275
commit
096857ee07
@ -0,0 +1,22 @@
|
||||
export const refreshOnCompleteAction = {
|
||||
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