alibaba / alibaba/lowcode-engine

@alilc/lowcode-utils 中 buildComponents 里未兼容 rax 组件相关逻辑导致 rax 组件预览失败

Open
#1,167 0 comments 0 reactions 2 assignees Claimed by @liujuping View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

## **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?(必填,非常重要)**

1. npm init @alilc/element rax-single-comp-1026 --registry=https://registry.npmmirror.com ;
2. cnpm i ;
3. npm run lowcode:dev 打开 http://localhost:3333 , 拖入组件;
4. 点击预览,白屏;

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.