alibaba / alibaba/lowcode-engine

arraysetter在1.0.12版本后的展示问题

Open
#1,855 5 comments 0 reactions 1 assignee Claimed by @hzd822 View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

lowcode-engine的1.0.12版本中,组件arraysetter设置initialValue右侧可正常展示。
![image](https://user-images.githubusercontent.com/22741303/230856409-e39cc4c5-1179-4c63-952f-5f52003d2dcd.png)

但是在之后的版本中无法展示默认值
![image](https://user-images.githubusercontent.com/22741303/230856627-4c827cc2-34da-4416-974b-e85baf8fb4f9.png)

下面是组件setter的配置
`{
componentName: 'Test',
title: 'Test',
docUrl: '',
screenshot: '',
devMode: 'proCode',
npm: {
package: '@alife/test',
version: '0.1.0',
exportName: 'default',
main: 'src/index.tsx',
destructuring: false,
subName: '',
},
configure: {
props: [
{
title: {
label: {
type: 'i18n',
'en-US': 'filterData',
'zh-CN': '自定义筛选项',
},
tip: 'filterData | 自定义筛选项',
},
name: 'filterData',
description: '自定义筛选项',
setter: {
componentName: 'ArraySetter',
props: {
itemSetter: {
componentName: 'ObjectSetter',
props: {
config: {
items: [
{
title: {
label: {
type: 'i18n',
'en-US': 'key',
'zh-CN': 'key',
},
},
name: 'key',
setter: {
componentName: 'StringSetter',
isRequired: true,
initialValue: '',
},
},
{
title: {
label: {
type: 'i18n',
'en-US': 'type',
'zh-CN': 'type',
},
},
name: 'type',
setter: {
componentName: 'StringSetter',
isRequired: true,
initialValue: 'string',
},
},
{
title: {
label: {
type: 'i18n',
'en-US': 'title',
'zh-CN': 'title',
},
},
name: 'title',
setter: {
componentName: 'StringSetter',
isRequired: true,
initialValue: '表单项',
},
},
{
title: {
label: {
type: 'i18n',
'en-US': 'x-component',
'zh-CN': 'x-component',
},
},
name: 'x-component',
setter: {
componentName: 'SelectSetter',
props: {
mode: 'single',
options: [
{
label: 'Input',
value: 'Input',
},
{
label: 'Select',
value: 'Select',
},
{
label: 'DateRangePicker',
value: 'DateRangePicker',
},
],
},
isRequired: true,
defaultValue: 'Input',
},
},
],
extraSetter: {
componentName: 'MixedSetter',
isRequired: false,
props: {},
},
},
},
},
},
isRequired: true,
initialValue: [
{
'x-component': 'Input',
label: '表单项1',
title: '表单项1',
key: 'test',
},
{
'x-component': 'Select',
label: '表单项2',
title: '表单项2',
key: 'test2',
},
{
'x-component': 'DateRangePicker',
label: '表单项3',
title: '表单项3',
key: 'test3',
},
],
},
},
],
supports: {
style: true,
},
component: {
isContainer: true,
},
},
}`

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.