From 12f658391a331860c165103011603631f4d600ed Mon Sep 17 00:00:00 2001 From: Ayden Date: Tue, 26 Jul 2022 21:07:34 +0800 Subject: [PATCH] fix: role export button display (#616) (#666) * fix: role export button display (#616) * fix: auditLogs view permissions (#617) * fix: role export button display (#616) * fix: auditLogs view permissions (#617) --- packages/plugins/audit-logs/src/client/AuditLogs.tsx | 1 - packages/plugins/export/src/client/useExportAction.ts | 2 +- packages/plugins/export/src/server/index.ts | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/plugins/audit-logs/src/client/AuditLogs.tsx b/packages/plugins/audit-logs/src/client/AuditLogs.tsx index 923d93084..d1523d1c5 100644 --- a/packages/plugins/audit-logs/src/client/AuditLogs.tsx +++ b/packages/plugins/audit-logs/src/client/AuditLogs.tsx @@ -176,7 +176,6 @@ export const AuditLogs: any = () => { 'x-component-props': { openMode: 'drawer', }, - 'x-decorator': 'ACLActionProvider', properties: { drawer: { type: 'void', diff --git a/packages/plugins/export/src/client/useExportAction.ts b/packages/plugins/export/src/client/useExportAction.ts index 6c2e9fc72..e6293ebf9 100644 --- a/packages/plugins/export/src/client/useExportAction.ts +++ b/packages/plugins/export/src/client/useExportAction.ts @@ -35,7 +35,7 @@ export const useExportAction = () => { es.dataIndex.push('name'); } }); - const { data } = await resource.exportXlsx( + const { data } = await resource.export( { title: compile(title), columns: JSON.stringify(compile(exportSettings)), diff --git a/packages/plugins/export/src/server/index.ts b/packages/plugins/export/src/server/index.ts index 26e3b7163..3b0ed2de1 100644 --- a/packages/plugins/export/src/server/index.ts +++ b/packages/plugins/export/src/server/index.ts @@ -9,8 +9,8 @@ export class ExportPlugin extends Plugin { beforeLoad() {} async load() { - this.app.resourcer.registerActionHandler('exportXlsx', exportXlsx); - this.app.acl.setAvailableAction('exportXlsx', { + this.app.resourcer.registerActionHandler('export', exportXlsx); + this.app.acl.setAvailableAction('export', { displayName: '{{t("Export")}}', allowConfigureFields: true, });