Closed lois332 closed 11 months ago
如果把formdata的两个值替换下呢? 第一个值匹配第二个anyof 能正确选中吗
---原始邮件--- 发件人: @.> 发送时间: 2023年8月1日(周二) 下午4:17 收件人: @.>; 抄送: @.***>; 主题: [lljj-x/vue-json-schema-form] array类型的参数,items使用anyOf回显问题 (Issue #317)
Vue2,element-ui,vue-json-schema-form 1.14.2
我定义了一个array类型的参数pipeline,它的items使用了anyOf(BinMethod,HeteroMapMethod),默认值是chi_bin和woe_map,分别在BinMethod和HeteroMapMethod的枚举参数中,出现了这样的问题,第二个参数woe_map的anyOf应该回显HeteroMapMethod,但实际情况显示了BinMethod,导致下拉也有问题,我想问一下这种情况,怎么才能有正确的参数回显
代码如下:,
{ "title": "测试专用页", "type": "object", "description": "输入你的Schema,顶部分享按钮即可快速生成链接", "properties": { "pipeline": { "title": "Pipeline", "default": [ "chi_bin", "woe_map" ], "type": "array", "items": { "anyOf": [ { "$ref": "#/definitions/BinMethod", "title": "BinMethod" }, { "$ref": "#/definitions/HeteroMapMethod", "title": "HeteroMapMethod" } ] } } }, "definitions": { "BinMethod": { "title": "BinMethod", "description": "An enumeration.", "enum": [ "equifrequent_bin", "equidist_bin", "chi_bin", "dt_bin" ], "type": "string" }, "HeteroMapMethod": { "title": "HeteroMapMethod", "description": "An enumeration.", "enum": [ "woe_map" ], "type": "string" } } }
效果如下:
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
并不能
问题已经明确 会出一个修复版本。 也会处理下,切换index时候会清空掉旧的select 内容。
预计周末会发布新版本
最新版已修复
Vue2,element-ui,vue-json-schema-form 1.14.2
我定义了一个array类型的参数pipeline,它的items使用了anyOf(BinMethod,HeteroMapMethod),默认值是chi_bin和woe_map,分别在BinMethod和HeteroMapMethod的枚举参数中,出现了这样的问题,第二个参数woe_map的anyOf应该回显HeteroMapMethod,但实际情况显示了BinMethod,导致下拉也有问题,我想问一下这种情况,怎么才能有正确的参数回显
代码如下:,
效果如下:![image](https://github.com/lljj-x/vue-json-schema-form/assets/40648460/3724651b-5856-491b-9548-6945441c2c6e)