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

array类型的参数,items使用anyOf回显问题 #317

Closed
lois332 opened this issue Aug 1, 2023 · 4 comments
Closed

array类型的参数,items使用anyOf回显问题 #317

lois332 opened this issue Aug 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@lois332
Copy link

lois332 commented Aug 1, 2023

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"
        }
    }
}

效果如下:
image

@lljj-x
Copy link
Owner

lljj-x commented Aug 1, 2023 via email

@lois332
Copy link
Author

lois332 commented Aug 2, 2023

并不能

@lljj-x lljj-x added the bug Something isn't working label Aug 4, 2023
@lljj-x
Copy link
Owner

lljj-x commented Aug 4, 2023

问题已经明确 会出一个修复版本。 也会处理下,切换index时候会清空掉旧的select 内容。

预计周末会发布新版本

@lljj-x lljj-x closed this as completed in 44dd77b Aug 5, 2023
@lljj-x
Copy link
Owner

lljj-x commented Aug 5, 2023

最新版已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants