From 6e7edc063adf49664902adbf8c7a4927f0abc50e Mon Sep 17 00:00:00 2001 From: hsm-lv Date: Mon, 8 Aug 2022 21:07:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BA=8B=E4=BB=B6=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I64977d57ca1108a75a2a67263a005d62ea9a4513 --- .../amis-editor/src/renderer/event-control/index.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/amis-editor/src/renderer/event-control/index.tsx b/packages/amis-editor/src/renderer/event-control/index.tsx index 05a18b23b..8cc905e91 100644 --- a/packages/amis-editor/src/renderer/event-control/index.tsx +++ b/packages/amis-editor/src/renderer/event-control/index.tsx @@ -517,8 +517,8 @@ export class EventControl extends React.Component< const actionConfig = actionConfigInitFormatter?.(action); const actionNode = findActionNode(actionTree, actionConfig?.actionType!); const hasSubActionNode = findSubActionNode(actionTree, action.actionType); - const cmpts = getComponents(actionNode!); - const node = findTree(cmpts, item => item.value === action.componentId); + const supportComponents = getComponents(actionNode!); + const node = findTree(supportComponents, item => item.value === action.componentId); let setValueDs: any = null; if (actionConfig?.actionType === 'setValue') { @@ -546,9 +546,7 @@ export class EventControl extends React.Component< __actionDesc: actionNode!.description!, // 树节点描述 __actionSchema: actionNode!.schema, // 树节点schema __subActions: hasSubActionNode?.actions, // 树节点子动作 - __cmptTreeSource: actionConfig?.componentId - ? getComponents?.(actionNode!) ?? [] - : [], + __cmptTreeSource: supportComponents ?? [], __superCmptTreeSource: allComponents, // __supersCmptTreeSource: '', __setValueDs: setValueDs @@ -597,8 +595,8 @@ export class EventControl extends React.Component< const actionNode = actionType && findActionNode(actionTree, actionType); if (action.componentId && actionNode) { - const cmpts = getComponents(actionNode); - const node = findTree(cmpts, item => item.value === action.componentId); + const supportComponents = getComponents(actionNode); + const node = findTree(supportComponents, item => item.value === action.componentId); if (node) { info = { ...info,