From e69e9b9940ed5adcd1b35df3eb421be90989426e Mon Sep 17 00:00:00 2001 From: sealday Date: Mon, 11 Mar 2024 12:31:36 +0800 Subject: [PATCH] fix: resource conflict with nocobase settings --- .../src/data-source/data-block/DataBlockResourceProvider.tsx | 4 ++-- .../src/client/schema-initializer/GroupBlockInitializer.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx b/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx index e7f89be6b..957a82c20 100644 --- a/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx +++ b/packages/core/client/src/data-source/data-block/DataBlockResourceProvider.tsx @@ -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 {children}; }; diff --git a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/GroupBlockInitializer.tsx b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/GroupBlockInitializer.tsx index 43652a8fa..2c4a174fb 100644 --- a/packages/plugins/@hera/plugin-core/src/client/schema-initializer/GroupBlockInitializer.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/schema-initializer/GroupBlockInitializer.tsx @@ -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: {