alibaba / lowcode-engine

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
https://lowcode-engine.cn
MIT License
14.66k stars 2.55k forks source link

物料的ArraySetter删除其中一个item后,其他的item就会变成[object Object] #827

Closed 329697166 closed 2 years ago

329697166 commented 2 years ago

f8c2ba668f35699e8113cd2fbce55f5 数组起始值: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] 删除后的数组: [ {"0": "T", "1": "u", "2": "e"}, {"0": "W", "1": "e", "2": "d"}, {"0": "T", "1": "h", "2": "u"}, {"0": "F", "1": "r", "2": "i"}, {"0": "S", "1": "a", "2": "t"}, {"0": "S", "1": "u", "2": "n"} ] 期望结果: ["Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]

hzd822 commented 2 years ago

fix in 1.0.5-beta.2 @alilc/lowcode-engine-ext

zhouxiny1 commented 2 years ago

这个问题修复了么?下载的最新的 @alilc/lowcode-engine-ext@1.0.5-beta.10 还是有这个问题

hzd822 commented 2 years ago

这个我今天发一个版本修复下

hzd822 commented 2 years ago

@zhouxiny1 能给个demo吗,我这边复现不了

zhouxiny1 commented 2 years ago

image image

就是meta里这么配置,然后删除一项就会像上图显示

hzd822 commented 2 years ago

先使用Object 嵌套看看, { "name": "data", "title": "选项数据", "setter": { "componentName": "ArraySetter", "props": { "itemSetter": { "componentName": "ObjectSetter", "props": { "config": { "items": [ { "name": "label", "title": "标签", "setter": { "componentName": "StringSetter", "isRequired": true } }, { "name": "value", "title": "选中值", "setter": { "componentName": "StringSetter", "isRequired": true } } ] } } } } } },

zhouxiny1 commented 2 years ago

这种是可以实现,但是对数据处理起来比较麻烦,例如图表的配色就是一个纯数组就可以,但是用上述说的却要转化两次 image

alex921131958 commented 1 year ago

@hzd822 请问后续有合并到稳定分支吗?@alilc/lowcode-engine-ext@1.0.5-beta.2 编辑arraySetter后切换高级面板会报错