fix: resource conflict with nocobase settings

This commit is contained in:
sealday 2024-03-11 12:31:36 +08:00
parent 16342247be
commit e69e9b9940
2 changed files with 3 additions and 3 deletions

View File

@ -35,8 +35,8 @@ export const DataBlockResourceProvider: FC<{ children?: ReactNode }> = ({ childr
if (association) {
return api.resource(association, sourceIdValue, headers);
}
return api.resource(dataBlockProps.resource ?? collectionName, undefined, headers);
}, [api, association, collection, sourceIdValue, headers, dataBlockProps.resource]);
return api.resource(dataBlockProps.resource_deprecated ?? collectionName, undefined, headers);
}, [api, association, collection, sourceIdValue, headers, dataBlockProps.resource_deprecated]);
return <DataBlockResourceContext.Provider value={resource}>{children}</DataBlockResourceContext.Provider>;
};

View File

@ -77,7 +77,7 @@ const createGroupBlockSchema = (options) => {
'x-decorator': 'GroupBlockProvider',
'x-decorator-props': {
collection: collection.name,
resource: 'charts',
resource_deprecated: 'charts',
action: 'query',
groupField,
params: {