JSON Schema 实现分享弹窗表单
{
"form": {
"labelCol": 6,
"wrapperCol": 12
},
"schema": {
"type": "object",
"properties": {
"k1gqvrhtx0o": {
"type": "string | number",
"title": "有效期",
"x-decorator": "FormItem",
"x-component": "Radio.Group",
"enum": [
{
"children": [],
"label": "一天",
"value": "1"
},
{
"children": [],
"label": "7天",
"value": "7"
},
{
"children": [],
"label": "30天",
"value": "30"
},
{
"children": [],
"label": "永久有效",
"value": "all"
}
],
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"default": "1",
"x-designable-id": "k1gqvrhtx0o",
"x-index": 0
},
"code": {
"type": "Array<string | number>",
"title": "安全验证",
"x-decorator": "FormItem",
"x-component": "Checkbox.Group",
"enum": [
{
"children": [],
"label": "无提取码",
"value": 0
},
{
"children": [],
"label": "有提取码",
"value": 1
}
],
"x-validator": [],
"x-decorator-props": {},
"name": "code",
"default": "0",
"x-designable-id": "ge26n4ri7kg",
"x-index": 1
},
"codeValue": {
"type": "string",
"title": "提取码",
"x-decorator": "FormItem",
"x-component": "Input",
"x-validator": [],
"x-component-props": {
"placeholder": "请输入6位提取码"
},
"x-decorator-props": {},
"name": "codeValue",
"x-designable-id": "51v07c8810i",
"x-index": 2,
"x-reactions": {
"dependencies": [
{
"property": "value",
"type": "Array<string | number>",
"source": "code",
"name": "code"
}
],
"fulfill": {
"state": {
"visible": "{{code !== 0}}"
}
}
},
"x-display": "hidden"
}
},
"x-designable-id": "q85iq2nif65"
}
}