mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 10:27:22 +00:00
chore: 解决低代码组件无法渲染的 bug
This commit is contained in:
parent
f14b871b0d
commit
0a09a61bbb
@ -210,8 +210,6 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
|
|
||||||
readonly viewport = new Viewport();
|
readonly viewport = new Viewport();
|
||||||
|
|
||||||
readonly scroller = this.designer.createScroller(this.viewport);
|
|
||||||
|
|
||||||
mountViewport(viewport: Element | null) {
|
mountViewport(viewport: Element | null) {
|
||||||
this.viewport.mount(viewport);
|
this.viewport.mount(viewport);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -169,11 +169,6 @@ const version = '6.0.0 (LowcodeEngine 0.9.32)';
|
|||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`%c VisionEngine %c v${version} `,
|
`%c VisionEngine %c v${version} `,
|
||||||
<<<<<<< HEAD
|
|
||||||
'padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060;font-weight:bold;',
|
|
||||||
'padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e;font-weight:bold;',
|
|
||||||
=======
|
|
||||||
'padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;',
|
'padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;',
|
||||||
'padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;',
|
'padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;',
|
||||||
>>>>>>> origin/refactor/vision-code-split
|
|
||||||
);
|
);
|
||||||
|
|||||||
@ -12,6 +12,6 @@ module.exports = {
|
|||||||
'no-prototype-builtins': 0,
|
'no-prototype-builtins': 0,
|
||||||
'array-callback-return': 0,
|
'array-callback-return': 0,
|
||||||
'@typescript-eslint/member-ordering': 0,
|
'@typescript-eslint/member-ordering': 0,
|
||||||
'react/no-find-dom-node', 0
|
'react/no-find-dom-node': 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -394,11 +394,8 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
|
|||||||
// const node = host.currentDocument?.createNode(_schema);
|
// const node = host.currentDocument?.createNode(_schema);
|
||||||
// _schema = node?.export(TransformStage.Render) || {};
|
// _schema = node?.export(TransformStage.Render) || {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const renderer = this;
|
const renderer = this;
|
||||||
const { componentsMap } = renderer;
|
const { componentsMap } = renderer;
|
||||||
|
|
||||||
return getComponentController(schema, componentsMap);
|
return getComponentController(schema, componentsMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,7 +549,6 @@ class ComponentCreator extends React.Component<{ schema: any; propsMap: any, com
|
|||||||
}
|
}
|
||||||
const props = processPropsSchema(schema.props, propsMap, componentsMap);
|
const props = processPropsSchema(schema.props, propsMap, componentsMap);
|
||||||
const _leaf = host.currentDocument?.createNode(schema);
|
const _leaf = host.currentDocument?.createNode(schema);
|
||||||
|
|
||||||
return createElement(ComponentClass, { ...props, _leaf }, children);
|
return createElement(ComponentClass, { ...props, _leaf }, children);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,10 +105,6 @@ export function isJSFunction(x: any): x is JSFunction {
|
|||||||
return typeof x === 'object' && x && x.type === 'JSFunction';
|
return typeof x === 'object' && x && x.type === 'JSFunction';
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
|
|
||||||
>>>>>>> origin/refactor/vision-code-split
|
|
||||||
export function isJSSlot(data: any): data is JSSlot {
|
export function isJSSlot(data: any): data is JSSlot {
|
||||||
return data && data.type === 'JSSlot';
|
return data && data.type === 'JSSlot';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,12 +91,12 @@ export function buildComponents(libraryMap: LibraryMap,
|
|||||||
components[componentName] = component;
|
components[componentName] = component;
|
||||||
} else {
|
} else {
|
||||||
component = findComponent(libraryMap, componentName, component);
|
component = findComponent(libraryMap, componentName, component);
|
||||||
}
|
if (component) {
|
||||||
if (component) {
|
if (!acceptsRef(component)) {
|
||||||
if (!acceptsRef(component)) {
|
component = wrapReactClass(component as FunctionComponent);
|
||||||
component = wrapReactClass(component as FunctionComponent);
|
}
|
||||||
|
components[componentName] = component;
|
||||||
}
|
}
|
||||||
components[componentName] = component;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return components;
|
return components;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user