mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-15 09:21:13 +08:00
fix:事件动作组件选择问题
Change-Id: I64977d57ca1108a75a2a67263a005d62ea9a4513
This commit is contained in:
parent
6e6d5e15b7
commit
6e7edc063a
@ -517,8 +517,8 @@ export class EventControl extends React.Component<
|
|||||||
const actionConfig = actionConfigInitFormatter?.(action);
|
const actionConfig = actionConfigInitFormatter?.(action);
|
||||||
const actionNode = findActionNode(actionTree, actionConfig?.actionType!);
|
const actionNode = findActionNode(actionTree, actionConfig?.actionType!);
|
||||||
const hasSubActionNode = findSubActionNode(actionTree, action.actionType);
|
const hasSubActionNode = findSubActionNode(actionTree, action.actionType);
|
||||||
const cmpts = getComponents(actionNode!);
|
const supportComponents = getComponents(actionNode!);
|
||||||
const node = findTree(cmpts, item => item.value === action.componentId);
|
const node = findTree(supportComponents, item => item.value === action.componentId);
|
||||||
|
|
||||||
let setValueDs: any = null;
|
let setValueDs: any = null;
|
||||||
if (actionConfig?.actionType === 'setValue') {
|
if (actionConfig?.actionType === 'setValue') {
|
||||||
@ -546,9 +546,7 @@ export class EventControl extends React.Component<
|
|||||||
__actionDesc: actionNode!.description!, // 树节点描述
|
__actionDesc: actionNode!.description!, // 树节点描述
|
||||||
__actionSchema: actionNode!.schema, // 树节点schema
|
__actionSchema: actionNode!.schema, // 树节点schema
|
||||||
__subActions: hasSubActionNode?.actions, // 树节点子动作
|
__subActions: hasSubActionNode?.actions, // 树节点子动作
|
||||||
__cmptTreeSource: actionConfig?.componentId
|
__cmptTreeSource: supportComponents ?? [],
|
||||||
? getComponents?.(actionNode!) ?? []
|
|
||||||
: [],
|
|
||||||
__superCmptTreeSource: allComponents,
|
__superCmptTreeSource: allComponents,
|
||||||
// __supersCmptTreeSource: '',
|
// __supersCmptTreeSource: '',
|
||||||
__setValueDs: setValueDs
|
__setValueDs: setValueDs
|
||||||
@ -597,8 +595,8 @@ export class EventControl extends React.Component<
|
|||||||
const actionNode = actionType && findActionNode(actionTree, actionType);
|
const actionNode = actionType && findActionNode(actionTree, actionType);
|
||||||
|
|
||||||
if (action.componentId && actionNode) {
|
if (action.componentId && actionNode) {
|
||||||
const cmpts = getComponents(actionNode);
|
const supportComponents = getComponents(actionNode);
|
||||||
const node = findTree(cmpts, item => item.value === action.componentId);
|
const node = findTree(supportComponents, item => item.value === action.componentId);
|
||||||
if (node) {
|
if (node) {
|
||||||
info = {
|
info = {
|
||||||
...info,
|
...info,
|
||||||
|
Loading…
Reference in New Issue
Block a user