From ecaee603bd24c72174a657e6539913bbf937616f Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sun, 26 Jan 2025 13:04:03 +0800 Subject: [PATCH 1/2] fix(useCompile): avoid error (#6141) --- .../src/schema-component/hooks/useCompile.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/schema-component/hooks/useCompile.ts b/packages/core/client/src/schema-component/hooks/useCompile.ts index edcb9fea4a..37a8dcfb87 100644 --- a/packages/core/client/src/schema-component/hooks/useCompile.ts +++ b/packages/core/client/src/schema-component/hooks/useCompile.ts @@ -39,13 +39,23 @@ export const useCompile = ({ noCache }: Props = { noCache: false }) => { // source is Component Object, for example: { 'x-component': "Cascader", type: "array", title: "所属地区(行政区划)" } if (source && typeof source === 'object' && !isValidElement(source)) { - cacheKey = JSON.stringify(source); - shouldCompile = hasVariable(cacheKey); + try { + cacheKey = JSON.stringify(source); + shouldCompile = hasVariable(cacheKey); + } catch (err) { + console.error(err); + shouldCompile = false; + } } // source is Array, for example: [{ 'title': "{{ ('Admin')}}", name: 'admin' }, { 'title': "{{ ('Root')}}", name: 'root' }] if (Array.isArray(source)) { - shouldCompile = hasVariable(JSON.stringify(source)); + try { + shouldCompile = hasVariable(JSON.stringify(source)); + } catch (err) { + console.error(err); + shouldCompile = false; + } } if (shouldCompile) { From 2a88c8a3b07293b28a631de43c6dc399af5587f3 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sun, 26 Jan 2025 13:08:37 +0800 Subject: [PATCH 2/2] fix: button linkage rule is not taking effect (#6140) --- packages/core/client/src/block-provider/hooks/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index fd4f8966cf..3bb093d75a 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1577,7 +1577,7 @@ export const getAppends = ({ } } else if ( ![ - 'ActionBar', + // 'ActionBar', 'Action', 'Action.Link', 'Action.Modal', @@ -1623,8 +1623,6 @@ export const useAssociationNames = (dataSource?: string) => { }); appends = fillParentFields(appends); - console.log('appends', appends); - return { appends: [...appends], updateAssociationValues: [...updateAssociationValues] }; };