fix: fixed the problem caused by component list being overwritten by Hoc

This commit is contained in:
liujuping 2023-10-26 11:24:17 +08:00 committed by 林熠
parent 0f02080035
commit 11ee97c6da

View File

@ -615,9 +615,6 @@ export default function baseRendererFactory(): IBaseRenderComponent {
}); });
}); });
Comp = compWrapper(Comp, { baseRenderer: this, schema });
components[schema.componentName] = Comp;
otherProps.ref = (ref: any) => { otherProps.ref = (ref: any) => {
this.$(props.fieldId || props.ref, ref); // 收集ref this.$(props.fieldId || props.ref, ref); // 收集ref
const refProps = props.ref; const refProps = props.ref;
@ -701,9 +698,9 @@ export default function baseRendererFactory(): IBaseRenderComponent {
*/ */
get __componentHOCs(): IComponentConstruct[] { get __componentHOCs(): IComponentConstruct[] {
if (this.__designModeIsDesign) { if (this.__designModeIsDesign) {
return [leafWrapper]; return [leafWrapper, compWrapper];
} }
return []; return [compWrapper];
} }
__getSchemaChildrenVirtualDom = (schema: IPublicTypeNodeSchema | undefined, scope: any, Comp: any, condition = true) => { __getSchemaChildrenVirtualDom = (schema: IPublicTypeNodeSchema | undefined, scope: any, Comp: any, condition = true) => {