alibaba / alibaba/lowcode-engine
精选组件-表单类组件初始化异常
- Dominant language
- TypeScript
- Stars
- 15.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
## **Describe the bug (required)** / **详细描述 bug(必填)**
高级表单组件拖到画布上渲染只有一个表单项 如下图

正常表现应该 如下图

---
## **To Reproduce (required)** / **如何复现 bug?(必填,非常重要)**
Steps to reproduce the behavior: / 详细复现步骤:
代码仓库地址为 https://github.com/alibaba/lowcode-materials/blob/main/packages/fusion-ui
本地 install && lowcode:dev
运行后选择高级表单组件拖拽立即复现
---
## **Environments (please complete the following information) (required):** / **请提供如下信息(必填)**
- 使用的都是官方仓库的代码没有任何调整
> (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. / 可以追加更多的额外信息,帮助定位问题
本人临时解决方案 删除下方链接文件的 57 行的对象中的 defaultValue: '表单项' 这个属性即可解决
https://github.com/alibaba/lowcode-materials/blob/main/packages/fusion-ui/lowcode/pro-form/common/form-item-props.ts

查询问题过程中发现 以下文件 215行 代码输出的hotValue有效值
https://github.com/alibaba/lowcode-materials/blob/main/packages/fusion-ui/lowcode/pro-form/common/form-base-props.ts#L215
但是后续会无限进入了 32行代码进行删除逻辑直到默认值被清空,有特征表现为itemSetValue接受的value的第一项会被奇妙的修改掉,到这里因为无法再检查堆栈调用就结束了然后跑去尝试删除defaultValue发现能临时解决,但是这会导致新的问题新增一项的时候label显示是空的
https://github.com/alibaba/lowcode-materials/blob/main/packages/fusion-ui/lowcode/pro-form/common/form-base-props.ts#L32
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.