用户信息 JSON表单
{
"form": {
"labelCol": 6,
"wrapperCol": 12
},
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "姓名",
"required": true,
"x-decorator": "FormItem",
"x-component": "Input",
"x-component-props": {
"hasClear": true,
"placeholder": "请输入",
"maxLength": 80,
"showCount": true
},
"name": "name",
"x-designable-id": "1janit4yors",
"x-index": 0,
"x-validator": [],
"x-decorator-props": {}
},
"sex": {
"type": "string | number",
"title": "性别",
"x-decorator": "FormItem",
"x-component": "Radio.Group",
"enum": [
{
"children": [],
"label": "男",
"value": 1
},
{
"children": [],
"label": "女",
"value": 2
},
{
"children": [],
"label": "保密",
"value": "3"
}
],
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "sex",
"required": true,
"default": 1,
"x-designable-id": "5ikay7pw1zh",
"x-index": 1
},
"hobby": {
"type": "string",
"title": "爱好",
"required": true,
"enum": [
{
"label": "吃饭",
"value": 1
},
{
"label": "睡觉",
"value": 2
}
],
"x-decorator": "FormItem",
"x-component": "Select",
"x-component-props": {
"hasClear": true,
"placeholder": "请选择"
},
"name": "hobby",
"x-designable-id": "3gq5r9tfdcn",
"x-index": 2,
"x-validator": [],
"x-decorator-props": {}
},
"birthday": {
"type": "string",
"title": "生日",
"required": true,
"x-decorator": "FormItem",
"x-component": "DatePicker",
"x-component-props": {
"hasClear": true,
"placeholder": "请选择"
},
"name": "birthday",
"x-designable-id": "3x336k3uqdp",
"x-validator": [],
"x-decorator-props": {},
"x-index": 3
},
"phone": {
"type": "string",
"title": "手机号码",
"required": true,
"format": "phone",
"x-decorator": "FormItem",
"x-component": "Input",
"x-component-props": {
"trim": true,
"hasClear": true,
"placeholder": "请输入",
"maxLength": 11,
"showLimitHint": true,
"showCount": true
},
"x-reactions": {
"dependencies": [
"catId"
],
"fulfill": {
"state": {
"visible": "{{$deps[0] === 123}}",
"disabled": "{{$deps[0] === 1234}}",
"required": "{{$deps[0] === 12345}}"
}
}
},
"name": "phone",
"x-designable-id": "l48hv7geg21",
"x-validator": [],
"x-decorator-props": {},
"x-index": 4
},
"description": {
"type": "string",
"title": "自我介绍",
"x-decorator": "FormItem",
"x-component": "Input.TextArea",
"x-component-props": {
"placeholder": ">=50字",
"row": 4,
"maxLength": 200,
"showLimitHint": true,
"showCount": true
},
"x-validator": {
"message": "请输入价格",
"required": true
},
"name": "description",
"x-designable-id": "upd51z6u3x0",
"x-decorator-props": {},
"x-index": 5
}
},
"x-designable-id": "t0lj5vhgrsg"
}
}
formily 默认表单
formily 常用的表单及属性
{
"form": {},
"schema": {
"type": "object",
"properties": {
"n9i1yr2cthp": {
"type": "void",
"x-component": "Card",
"x-component-props": {
"title": "Card 默认表单"
},
"x-designable-id": "n9i1yr2cthp",
"properties": {
"input": {
"type": "object",
"x-validator": [],
"name": "input",
"x-designable-id": "nmmz89ku2jd",
"x-index": 17
},
"textarea": {
"type": "string",
"title": "TextArea",
"x-decorator": "FormItem",
"x-component": "Input.TextArea",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "textarea",
"x-designable-id": "vf36t6tb4qp",
"x-index": 1
},
"password": {
"title": "Password",
"x-decorator": "FormItem",
"x-component": "Password",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "password",
"x-designable-id": "hoq1y5gw7uw",
"x-index": 2
},
"numberPicker": {
"type": "number",
"title": "NumberPicker",
"x-decorator": "FormItem",
"x-component": "NumberPicker",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "numberPicker",
"x-designable-id": "qit4hug5zkv",
"x-index": 3
},
"rate": {
"type": "number",
"title": "Rate",
"x-decorator": "FormItem",
"x-component": "Rate",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "rate",
"x-designable-id": "8amprw9q370",
"x-index": 4
},
"slider": {
"type": "number",
"title": "Slider",
"x-decorator": "FormItem",
"x-component": "Slider",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "slider",
"x-designable-id": "n44up6gef7y",
"x-index": 5
},
"select": {
"title": "Select",
"x-decorator": "FormItem",
"x-component": "Select",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "select",
"x-designable-id": "9j1kldh9xia",
"x-index": 6
},
"treeSelect": {
"title": "TreeSelect",
"x-decorator": "FormItem",
"x-component": "TreeSelect",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "treeSelect",
"x-designable-id": "0wieiuiboul",
"x-index": 7
},
"cascader": {
"title": "Cascader",
"x-decorator": "FormItem",
"x-component": "Cascader",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "cascader",
"x-designable-id": "2zoy0fpy86z",
"x-index": 8
},
"dateRange": {
"type": "string[]",
"title": "DateRangePicker",
"x-decorator": "FormItem",
"x-component": "DatePicker.RangePicker",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "dateRange",
"x-designable-id": "bs7izjqqvyx",
"x-index": 9
},
"datePicker": {
"type": "string",
"title": "DatePicker",
"x-decorator": "FormItem",
"x-component": "DatePicker",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "datePicker",
"x-designable-id": "1mjadpk1sgm",
"x-index": 10
},
"timePicker": {
"type": "string",
"title": "TimePicker",
"x-decorator": "FormItem",
"x-component": "TimePicker",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "timePicker",
"x-designable-id": "h31a9tsg32r",
"x-index": 11
},
"timeRange": {
"type": "string[]",
"title": "TimeRangePicker",
"x-decorator": "FormItem",
"x-component": "TimePicker.RangePicker",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "timeRange",
"x-designable-id": "mbalmkxbd9e",
"x-index": 12
},
"upload": {
"type": "Array<object>",
"title": "Drag Upload",
"x-decorator": "FormItem",
"x-component": "Upload.Dragger",
"x-component-props": {
"textContent": "Click or drag file to this area to upload"
},
"x-validator": [],
"x-decorator-props": {},
"name": "upload",
"x-designable-id": "du33hhvxn0l",
"x-index": 18
},
"radio": {
"type": "string | number",
"title": "Radio Group",
"x-decorator": "FormItem",
"x-component": "Radio.Group",
"enum": [
{
"label": "选项1",
"value": 1
},
{
"label": "选项2",
"value": 2
}
],
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "radio",
"x-designable-id": "2hqwhjmdve7",
"x-index": 14
},
"checkbox": {
"type": "Array<string | number>",
"title": "Checkbox Group",
"x-decorator": "FormItem",
"x-component": "Checkbox.Group",
"enum": [
{
"label": "选项1",
"value": 1
},
{
"label": "选项2",
"value": 2
}
],
"x-validator": [],
"x-decorator-props": {},
"name": "checkbox",
"x-designable-id": "z15k9infa7d",
"x-index": 15
},
"switch": {
"type": "boolean",
"title": "Switch",
"x-decorator": "FormItem",
"x-component": "Switch",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "switch",
"x-designable-id": "gbscfwpc3tb",
"x-index": 16
},
"transer": {
"title": "Transfer",
"x-decorator": "FormItem",
"x-component": "Transfer",
"x-validator": [],
"x-component-props": {},
"x-decorator-props": {},
"name": "transer",
"x-designable-id": "quqj3lc1v3a",
"x-index": 19
}
},
"x-index": 0
}
},
"x-designable-id": "95lf4ez1302"
}
}