Skip to content

Commit 4d9b2cc

Browse files
authored
feat: 动作面板schema配置支持函数 (#11884) (#11914)
1 parent ad4b535 commit 4d9b2cc

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/amis-editor/src/renderer/event-control/action-config-panel.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,17 @@ export default class ActionConfigPanel extends React.Component<RendererProps> {
3636
data.componentId === 'customCmptId' ? true : false,
3737
manager
3838
);
39+
40+
const _subActionSchema = isFunction(subActionSchema)
41+
? subActionSchema(manager, data)
42+
: subActionSchema;
43+
3944
// 追加到基础配置
4045
schema = [
4146
...(Array.isArray(baseSchema) ? baseSchema : [baseSchema]),
42-
...(Array.isArray(subActionSchema)
43-
? subActionSchema
44-
: [subActionSchema])
47+
...(Array.isArray(_subActionSchema)
48+
? _subActionSchema
49+
: [_subActionSchema])
4550
];
4651
} else {
4752
const __originActionSchema = data.__actionSchema;

0 commit comments

Comments
 (0)