2022-06-14 15:01:53 +08:00
|
|
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
|
|
|
import { exportXlsx } from './actions';
|
|
|
|
|
|
|
|
export class ExportPlugin extends Plugin {
|
|
|
|
getName(): string {
|
|
|
|
return this.getPackageName(__dirname);
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeLoad() {}
|
|
|
|
|
|
|
|
async load() {
|
|
|
|
this.app.resourcer.registerActionHandler('exportXlsx', exportXlsx);
|
2022-06-14 22:04:33 +08:00
|
|
|
this.app.acl.setAvailableAction('exportXlsx', {
|
|
|
|
displayName: '{{t("Export")}}',
|
|
|
|
allowConfigureFields: true,
|
|
|
|
});
|
2022-06-14 15:01:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
async install(options: InstallOptions) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ExportPlugin;
|