lowcode-engine icon indicating copy to clipboard operation
lowcode-engine copied to clipboard

更新engine版本兼容报错

Open 286yym opened this issue 3 years ago • 10 comments

Describe the bug (required) / 详细描述 bug(必填)

A clear and concise description of what the bug is. / 请提供清晰且精确的 bug 描述 更新版本1.0.9 (含1.0.9)以上的会依赖报错

To Reproduce (required) / 如何复现 bug?(必填,非常重要)

Steps to reproduce the behavior: / 详细复现步骤: 将版本1.0.8升级 至 1.0.9或1.0.10版本,出现兼容错误 react-dom.production.min.js会兼容报错

Expected behavior (required) / 预期行为(必填,非常重要)

A clear and concise description of what did you expect to happen. / 请清晰和精确的描述你预期的行为 可以更新同步官方最新版本,或者dome可以更新依赖,让工程不报错即可

Screenshots (optional) / bug 截图(可选)

Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题 更新版本后 image image image image 更新前 image


Environments (please complete the following information) (required): / 请提供如下信息(必填)

  • AliLowCodeEngine version: [e.g. 1.0.10] / 低代码引擎版本
  • AliLowCodeEngineExt version: [e.g. 1.0.3] / 低代码引擎扩展包版本

286yym avatar Jun 22 '22 08:06 286yym

1.0.9的时候就有这个问题了,最外层缺少了个componentName: 'Page',提了iss,还没有解决。你需要点击一下数据源才能正常显示页面。我现在是回退到了1.0.8版本

新页面创建的时候不要传空,自己添加外层Page进去。但是老页面兼容太麻烦了,所以我选择了回退版本

oneQiu avatar Jun 22 '22 08:06 oneQiu

写一下复现步骤?

LeoYuan avatar Jun 22 '22 09:06 LeoYuan

image 初始数据,有兼容问题 // 表单的初始化数据 const initFormData = { componentName: 'Page', methods: {}, props: {}, fileName: '', hidden: true, title: '页面', isLocked: false, condition: true, conditionGroup: '', children: [], } // 加载 schema project.openDocument(JSON.parse(JSON.stringify(initFormData)));

286yym avatar Jun 22 '22 09:06 286yym

image dome这样改,报错就出来了

286yym avatar Jun 22 '22 09:06 286yym

照着你说的步骤改了之后,没有出现图中的报错。

liujuping avatar Jun 22 '22 09:06 liujuping

image image image image 这个步骤直接就报错了呀,是最新的demo工程

286yym avatar Jun 22 '22 09:06 286yym

复现了,我看看

liujuping avatar Jun 22 '22 10:06 liujuping

  1. 版本1.0.8以上 不包括1.0.8
  2. 通过openDocument() 打开新页面 不要写任何schema
  3. 只要不点击数据源 页面就无法加载成功,从schema的区别来看,1.0.8以上的版本缺少了component: Page自动生成,只要添加这句schema就不会出错了。

我的复现步骤

oneQiu avatar Jun 22 '22 11:06 oneQiu

这个问题是因为在 1.0.8 版本及之前用的是内置的数据源引擎,在 1.0.8 之后的版本引擎由于支持了配置 appHelper 函数,且在 demo 中配置了 appHelper 函数,其中 appHelper 的包有一些兼容性问题。

目前有几种处理方案:

1.数据源不使用外置的,不需要等发版 image

2.@alilc/lowcode-datasource-fetch-handler 相关的改动我会提个 PR,等其合并之后升级版本。@Clarence-pan

3.引擎这里传的参数会做一下处理,也会提个 PR,需要等下一个正式的引擎版本。

4.可以照着 https://github.com/alibaba/lowcode-datasource 写一个自己的 requestHandlersMap.fetch 函数来替代

liujuping avatar Jun 23 '22 02:06 liujuping

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] avatar Jul 04 '22 02:07 github-actions[bot]