-
Notifications
You must be signed in to change notification settings - Fork 1k
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
希望schema中list的items可以支持type="string" #851
Comments
+1 |
想要达到什么样的效果呢? |
{ |
emmm...感觉怪怪的,list组件一般都会有多个表单项吧,换成string,想象不到会长成什么样,除非每一项只有一个input? |
vue-json-schema实现的方式是一个带+/-按钮的输入框,每个输入框对应数组中的某一项,这样的话如果jsonschem的items中有min和max也可以控制+/-按钮来实现 |
好兄弟,要不来个PR吧 |
截个图看看? |
|
没错,input 的type根据items的type来 @siyi98 |
懂你的意思了,等下个版本吧。有时间的话,你也可以提PR |
基于现版本的架构,改造成本太大,放到XRender2.0做吧,我先把这个需求放到discussion里面去。 #770 |
请求有支持这个功能的计划吗?在2.x的playground试了一下,似乎仍然不支持 @siyi98 |
我后来自己实现了自定义组件,只要确保value和onchange是你要的值就行 |
期望的新功能 (describe the expected new feature)
希望schema中list的items可以支持type="string",而不是只支持object类型
简述一下使用场景,便于开发者更好理解新功能的必要性 (describe your scenario for us to understand the need)
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Product",
"description": "A product from Acme's catalog",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
}
这样一个基础的schema在form-render 中无法正常使用
The text was updated successfully, but these errors were encountered: