Coder Social home page Coder Social logo

Comments (5)

lljj-x avatar lljj-x commented on June 26, 2024 2

大致看了下,应该是 这里的schema 没有经过retrieve方法处理,要看看哪里处理合适,如果你有兴趣的话 也可以贡献代码

https://github.com/lljj-x/vue-json-schema-form/blob/master/packages/lib/vue2/vue2-core/src/fields/combiningSchemas/SelectLinkageField/index.js#L71C33-L71C39

类似下面

retrieveSchema(xxxx)

from vue-json-schema-form.

laorange avatar laorange commented on June 26, 2024

经过进一步测试,初步排出:该问题是因为子节点为$ref

对比测试,直接使用对应的Object内容而非$ref对应的Playground中能够正常显示:

{
    "properties": {
        "common": {
            "oneOf": [
                {
                    "properties": {
                        "fooA": {
                            "default": 0,
                            "title": "ClassA的属性",
                            "type": "number"
                        }
                    },
                    "title": "类型A",
                    "type": "object"
                },
                {
                    "properties": {
                        "fooB": {
                            "default": 0,
                            "title": "ClassB的属性",
                            "type": "number"
                        }
                    },
                    "title": "类型B",
                    "type": "object"
                }
            ],
            "title": "OneOf属性",
            "description": "A/B类型二选一"
        }
    },
    "title": "OneOf模型测试",
    "type": "object"
}

from vue-json-schema-form.

lljj-x avatar lljj-x commented on June 26, 2024

子节点不是 $ref 的时候是可以正常取到标题的对吧 ?

from vue-json-schema-form.

laorange avatar laorange commented on June 26, 2024

子节点不是 $ref 的时候是可以正常取到标题的对吧 ?

😄是的,上面提到的两个对比测试:

from vue-json-schema-form.

lljj-x avatar lljj-x commented on June 26, 2024

这周处理下

from vue-json-schema-form.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.