mirror of
https://github.com/zhigang1992/form-render.git
synced 2026-06-12 08:48:15 +08:00
93 lines
2.8 KiB
JSON
93 lines
2.8 KiB
JSON
{
|
|
"propsSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"case1": {
|
|
"title": "整体隐藏",
|
|
"type": "object",
|
|
"properties": {
|
|
"showMore": {
|
|
"title": "显示更多",
|
|
"type": "boolean"
|
|
},
|
|
"x1": {
|
|
"title": "输入框1",
|
|
"type": "string",
|
|
"ui:hidden": "{{rootValue.showMore === false}}"
|
|
},
|
|
"x2": {
|
|
"title": "输入框2",
|
|
"type": "string",
|
|
"ui:hidden": "{{rootValue.showMore === false}}"
|
|
}
|
|
}
|
|
},
|
|
"case2": {
|
|
"title": "选项联动",
|
|
"type": "object",
|
|
"properties": {
|
|
"bi": {
|
|
"title": "汇款币种",
|
|
"type": "string",
|
|
"enum": ["rmb", "dollar"],
|
|
"enumNames": ["人民币", "美元"]
|
|
},
|
|
"inputName": {
|
|
"title": "金额",
|
|
"description": "{{rootValue.bi === 'dollar' ? '一次汇款不超过150美元':'一次汇款不超过1000元'}}",
|
|
"type": "string",
|
|
"ui:options": "{{{addonBefore: rootValue.bi === 'rmb'? '¥':'$', addonAfter: rootValue.bi === 'rmb'? '元':'美元'}}}"
|
|
}
|
|
}
|
|
},
|
|
"case3": {
|
|
"title": "列表/显示不同组件",
|
|
"type": "object",
|
|
"properties": {
|
|
"ruleList": {
|
|
"title": "球员筛选",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"attr": {
|
|
"title": "标准",
|
|
"type": "string",
|
|
"enum": ["goal", "league"],
|
|
"enumNames": ["入球数", "所在联盟"],
|
|
"ui:width": "40%"
|
|
},
|
|
"relation": {
|
|
"title": "-",
|
|
"type": "string",
|
|
"enum": [">", "<", "="],
|
|
"ui:hidden": "{{rootValue.attr === 'league'}}",
|
|
"ui:width": "20%"
|
|
},
|
|
"goal": {
|
|
"title": "入球数",
|
|
"type": "string",
|
|
"pattern": "^[0-9]+$",
|
|
"message": {
|
|
"pattern": "输入正确得分"
|
|
},
|
|
"ui:hidden": "{{rootValue.attr !== 'goal'}}",
|
|
"ui:width": "40%"
|
|
},
|
|
"league": {
|
|
"title": "名称",
|
|
"type": "string",
|
|
"enum": ["a", "b", "c"],
|
|
"enumNames": ["西甲", "英超", "中超"],
|
|
"ui:hidden": "{{rootValue.attr !== 'league'}}",
|
|
"ui:width": "40%"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|