fix:事件动作组件选择问题

Change-Id: I64977d57ca1108a75a2a67263a005d62ea9a4513
This commit is contained in:
hsm-lv 2022-08-08 21:07:12 +08:00
parent 6e6d5e15b7
commit 6e7edc063a

View File

@ -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,