我有这个架构:
{
"title": "Test dependncies",
"description": "This a test to show how we can use dependencies in json schema",
"properties":{
"graduate": {
"title":"Graduate?",
"type":"string",
"enum":["Yes","No"],
"options": {
"dependencies":[
{"id":"minimumEligibilityAge","value":"Yes"},
{"id":"courseName","value":"No"}
]
}
},
"minimumEligibilityAge":{
"id":"minimumEligibilityAge",
"title":"Enter Age",
"type":"number",
"options":{"hide_display":true}
},
"courseName":{
"id":"courseName",
"title":"Enter Graduation Course Name",
"type":"string"
}
},
"type": "object"
}
我可以使用Angular-schema-form生成表单。
minimumEligibilityAge & courseName 根据属性的值隐藏/显示。但它没有工作&我没有错误。