Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个formSchema中如果有两个category,那么使用array的类型就不能渲染,并且功能也实现不了 #330

Open
llt-x opened this issue Oct 24, 2023 · 3 comments

Comments

@llt-x
Copy link

llt-x commented Oct 24, 2023

反馈问题请先查看文档和务必提供详细的复现代码,遵循如下格式,描述不清楚的问题将会直接关闭。

vue和ui框架

vue2

问题描述

一个formSchema中如果有两个category,那么使用array的类型就不能渲染,设置的默认值以及功能也实现不了

如何复现

可以详细介绍你的复现场景或者相关代码。

必要时提供复现demo,如codepen,github 复现仓库,playground分享链接等

期望的结果

....

@lljj-x
Copy link
Owner

lljj-x commented Nov 3, 2023

贴下schema

@llt-x
Copy link
Author

llt-x commented Nov 8, 2023

贴下schema

type: 'object',
properties: {
tabDivideMode: {
type: 'string',
title: '分隔模式',
default: 'average',
enum: ['content', 'average'],
enumNames: ['内容适配', '均分'],
category: '基础属性'
},
tabList: {
type: 'array',
title: 'Tab列表',
'ui:options': {
showIndexNumber: true
},
default: [
{
title: '标签一',
img: 'https://yppphoto.1-xian.cn/yppphoto/e38265ae929c48528782a8727abce331.png'
},
{
title: '标签二',
img: '"https://yppphoto.1-xian.cn/yppphoto/7edde32a785d440681141407f643d5fa.png'
}
],
category: '别的属性',
items: {
type: 'object',
properties: {
title: {
type: 'string',
title: '标题'
},
img: {
type: 'string',
title: '图片'
// 'ui:widget': 'Upload'
}
}
}
}
}

@lljj-x
Copy link
Owner

lljj-x commented Nov 9, 2023

JSONSchema 有category语法吗 ? 看着没问题 Demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants