tachybase_todo/packages/plugins/@nocobase/plugin-export/src/server/index.ts

19 lines
456 B
TypeScript
Raw Normal View History

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;