* feat: improve code * chore: update version * feat: api service * fix: api services * feat: improve code * feat: improve code * feat: improve code * feat: pm socket * fix: test errors * feat: add built-in plugins before upgrade * feat: update docs * feat: improve code * fix: after load
19 lines
456 B
TypeScript
19 lines
456 B
TypeScript
import { InstallOptions, Plugin } from '@nocobase/server';
|
|
import { exportXlsx } from './actions';
|
|
|
|
export class ExportPlugin extends Plugin {
|
|
beforeLoad() {}
|
|
|
|
async load() {
|
|
this.app.resourcer.registerActionHandler('export', exportXlsx);
|
|
this.app.acl.setAvailableAction('export', {
|
|
displayName: '{{t("Export")}}',
|
|
allowConfigureFields: true,
|
|
});
|
|
}
|
|
|
|
async install(options: InstallOptions) {}
|
|
}
|
|
|
|
export default ExportPlugin;
|