alibaba / alibaba/lowcode-engine

ali-lowcode-engine在燕鸥主应用无法正常渲染

Open
#2,247 5 comments 0 reactions 0 assignees 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(必填)**

业务使用了@ali/lowcode-engine,自己是可以正常访问的,但是集成到微服务框架燕鸥就无法正常渲染,找燕鸥的同学排查了,主要是因为燕鸥对window进行处理,子应用可以访问主应用的window,但是lowcode的渲染是iframe,里面访问子应用的window.React就无法获取到,然后就无法正常渲染了

A clear and concise description of what the bug is. / 请提供清晰且精确的 bug 描述
![image](https://github.com/alibaba/lowcode-engine/assets/118963745/85df09fe-b8ee-4527-8d49-436e6b1aef7a)

问题分析:
![image](https://github.com/alibaba/lowcode-engine/assets/118963745/faea6502-ff6f-4c56-8d63-88b4778d7bd4)

修复建议:
![image](https://github.com/alibaba/lowcode-engine/assets/118963745/bc07ad63-8b5f-4812-9431-bc0803742a6d)

能不能在这里自己引入 react 和 react-dom,而不是从parent中获取

## **Environments (please complete the following information) (required):** / **请提供如下信息(必填)**
- AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本 1.0.63
- AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本 1.0.12
- Browser [e.g. chrome, safari] / 浏览器版本
- materials / plugins / tools / 其他物料 / 插件 / 工具链版本

> (this information can be collected via [the manual plugin](https://img.alicdn.com/imgextra/i1/O1CN0115zonY1IsgbkZ2ir7_!!6000000000949-2-tps-3066-1650.png) / 版本信息可[通过低代码用户手册插件收集](https://img.alicdn.com/imgextra/i1/O1CN0115zonY1IsgbkZ2ir7_!!6000000000949-2-tps-3066-1650.png))

## **Additional context (optional)** / **更多额外信息(可选)**
Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with AliLowCodeEngine 1.0.63 and AliLowCodeEngineExt 1.0.12 in the 燕鸥 microservice framework, focusing on iframe rendering and React access through the parent window. Compare the current parent-window dependency with the proposed local react and react-dom loading. Done means the low-code engine renders normally when integrated into the 燕鸥 main application.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.