x-render icon indicating copy to clipboard operation
x-render copied to clipboard

希望支持普通数组

Open hedyma86 opened this issue 2 years ago • 10 comments

期望的新功能 (describe the expected new feature)

简述一下使用场景,便于开发者更好理解新功能的必要性 (describe your scenario for us to understand the need)

{ "type": "object", "properties": { "arrDemo": { "title": "数组", "type": "array", "widget": "list2", "min": 1, "max": 3, "items": { "type": "number", "widget": "slider" } } } }

期望的modeljson是 { nums:[1,2,3...任意数字] }

现在貌似只支持用mode:tag的形式支持 字符串数组,无法支持其他类型的普通数组。如 bl:[true,false....]或者 nums:[1,2,3...任意数字]

hedyma86 avatar Jun 21 '22 03:06 hedyma86

额...没太看明白,你的schema里写的是slider吧,model json又是什么?

siyi98 avatar Jun 21 '22 03:06 siyi98

mode:tag我记得是select的属性吧

siyi98 avatar Jun 21 '22 03:06 siyi98

我最终希望生成的表单数据是 { arrDemo:[1,2,3...任意数字] }

但用上面的schema无效

hedyma86 avatar Jun 21 '22 05:06 hedyma86

如果我想生成 { arrDemo:[‘a’,'o','e'] } 现在咱们组件里用select可以实现。 但想生成 { arrDemo:[1,2,3...n] } 该怎么实现

hedyma86 avatar Jun 21 '22 05:06 hedyma86

enum写成 number就好了吧,比如:

{
    enum: [1,2,3],
    enumNames: ['a', 'b', 'c']
}

siyi98 avatar Jul 01 '22 06:07 siyi98

比如就是1-10000,数组长度不定,希望用户可以通过新增一个这种方式,添加任意个

hedyma86 avatar Jul 06 '22 01:07 hedyma86

这个问题解决了吗? 现在无法输入普通的数字数组。 比如 { km: [1.31, 4.22, 10.11], } 现在没办法输入

missmess avatar Aug 15 '22 08:08 missmess

@hedyma86 截图给个demo看看吧,还是不太明白

siyi98 avatar Sep 20 '22 13:09 siyi98

这个问题解决了吗? 现在无法输入普通的数字数组。 比如 { km: [1.31, 4.22, 10.11], } 现在没办法输入

你要直接form.setValues()吗?

siyi98 avatar Sep 20 '22 13:09 siyi98

Hello @hedyma86. We totally like your proposal/feedback, welcome PR 🎉。

你好 @hedyma86,我们完全同意你的提议/反馈,欢迎PR 🎉。

github-actions[bot] avatar Sep 20 '22 13:09 github-actions[bot]