mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 04:28:32 +08:00
fix:事件动作组件选择问题
Change-Id: I51852bd7c5c935ec0ed61eb554428d99ac986b2e
This commit is contained in:
parent
a3de043b1f
commit
6e6d5e15b7
@ -656,7 +656,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
||||
</div>
|
||||
);
|
||||
},
|
||||
supportComponents: [],
|
||||
supportComponents: 'byComponent',
|
||||
schema: renderCmptSelect('选择组件', true)
|
||||
},
|
||||
{
|
||||
@ -681,7 +681,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
||||
</div>
|
||||
);
|
||||
},
|
||||
supportComponents: [],
|
||||
supportComponents: 'byComponent',
|
||||
schema: [
|
||||
...renderCmptActionSelect('选择组件', true),
|
||||
getArgsWrapper({
|
||||
|
@ -992,12 +992,14 @@ export const getEventControlConfig = (
|
||||
isSupport =
|
||||
action.supportComponents === '*' ||
|
||||
action.supportComponents === node.type;
|
||||
// 内置逻辑
|
||||
if (action.supportComponents === 'byComponent') {
|
||||
isSupport = hasActionType(actionType, actions);
|
||||
}
|
||||
} else if (Array.isArray(action.supportComponents)) {
|
||||
isSupport = action.supportComponents.includes(node.type);
|
||||
}
|
||||
if (['reload', 'setValue'].includes(actionType)) {
|
||||
isSupport = hasActionType(actionType, actions);
|
||||
}
|
||||
|
||||
if (actionType === 'component' && !actions?.length) {
|
||||
node.disabled = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user