lowcode-engine
lowcode-engine copied to clipboard
@alilc/lowcode-utils 中 buildComponents 里未兼容 rax 组件相关逻辑导致 rax 组件预览失败
Describe the bug (required) / 详细描述 bug(必填)
@alilc/lowcode-utils 中 buildComponents 里未兼容 rax 组件相关逻辑,对于没有接收 ref 的组件直接封装成 react 组件,导致 rax 组件渲染不成功;
https://github.com/alibaba/lowcode-engine/blob/86b8889ec4c8e612528101879c31ea0f1642bb99/packages/utils/src/build-components.ts#L115
component = findComponent(libraryMap, componentName, component);
if (component) {
if (!acceptsRef(component)) {
component = wrapReactClass(component as FunctionComponent);
}
components[componentName] = component;
}
To Reproduce (required) / 如何复现 bug?(必填,非常重要)
- npm init @alilc/element rax-single-comp-1026 --registry=https://registry.npmmirror.com ;
- cnpm i ;
- npm run lowcode:dev 打开 http://localhost:3333 , 拖入组件;
- 点击预览,白屏;