diff --git a/packages/core/client/src/acl/ACLProvider.tsx b/packages/core/client/src/acl/ACLProvider.tsx
index 19d8433475..478bacb68f 100644
--- a/packages/core/client/src/acl/ACLProvider.tsx
+++ b/packages/core/client/src/acl/ACLProvider.tsx
@@ -314,15 +314,15 @@ export const ACLActionProvider = (props) => {
const schema = useFieldSchema();
const currentUid = schema['x-uid'];
let actionPath = schema['x-acl-action'];
- const editablePath = ['create', 'update', 'destroy', 'importXlsx'];
+ // 只兼容这些数据表资源按钮
+ const resourceActionPath = ['create', 'update', 'destroy', 'importXlsx', 'export'];
- if (!actionPath && resource && schema['x-action'] && editablePath.includes(schema['x-action'])) {
+ if (!actionPath && resource && schema['x-action'] && resourceActionPath.includes(schema['x-action'])) {
actionPath = `${resource}:${schema['x-action']}`;
}
if (actionPath && !actionPath?.includes(':')) {
actionPath = `${resource}:${actionPath}`;
}
-
const params = useMemo(
() => actionPath && parseAction(actionPath, { schema, recordPkValue }),
[parseAction, actionPath, schema, recordPkValue],
@@ -340,7 +340,7 @@ export const ACLActionProvider = (props) => {
return {props.children};
}
//视图表无编辑权限时不显示
- if (editablePath.includes(actionPath) || editablePath.includes(actionPath?.split(':')[1])) {
+ if (resourceActionPath.includes(actionPath) || resourceActionPath.includes(actionPath?.split(':')[1])) {
if ((collection && collection.template !== 'view') || collection?.writableView) {
return {props.children};
}