File size: 6,094 Bytes
c9d0005 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | {
"schema": {
"type": "object",
"properties": {
"AllString": {
"title": "string类",
"type": "object",
"properties": {
"input": {
"title": "简单输入框",
"type": "string",
"placeholder": "昵称"
},
"textarea": {
"title": "文本编辑框",
"type": "string",
"format": "textarea"
},
"color": {
"title": "颜色选择",
"type": "string",
"format": "color"
},
"image": {
"title": "图片展示",
"type": "string",
"format": "image",
"default": "http://placekitten.com/200/300"
},
"uploader": {
"title": "上传文件",
"type": "string",
"format": "upload",
"props": {
"action": "https://www.mocky.io/v2/5cc8019d300000980a055e76"
}
},
"treeSelect": {
"title": "树形选择",
"type": "string",
"widget": "treeSelect",
"props": {
"treeDefaultExpandAll": true,
"treeData": [
{
"title": "Node1",
"value": "0-0",
"key": "0-0",
"children": [
{
"title": "Child Node1",
"value": "0-0-1",
"key": "0-0-1"
},
{
"title": "Child Node2",
"value": "0-0-2",
"key": "0-0-2"
}
]
},
{
"title": "Node2",
"value": "0-1",
"key": "0-1"
}
]
}
}
}
},
"allDate": {
"title": "时间类",
"type": "object",
"properties": {
"date": {
"title": "日期选择",
"type": "string",
"format": "date"
},
"dateTime": {
"title": "日期时间选择",
"type": "string",
"format": "dateTime"
},
"time": {
"title": "时间选择",
"type": "string",
"format": "time"
},
"dateRange": {
"title": "日期范围",
"type": "range",
"format": "dateTime",
"placeholder": ["开始时间", "结束时间"]
},
"timeRange": {
"title": "时间范围",
"type": "range",
"format": "time"
},
"year": {
"title": "年份选择",
"type": "string",
"format": "year"
},
"month": {
"title": "月份选择",
"type": "string",
"format": "month"
},
"week": {
"title": "周选择",
"type": "string",
"format": "week"
},
"quarter": {
"title": "季度选择",
"type": "string",
"format": "quarter"
}
}
},
"allNumber": {
"title": "number类",
"type": "object",
"properties": {
"number1": {
"title": "数字输入框",
"description": "1 - 1000",
"type": "number",
"min": 1,
"max": 1000
},
"number2": {
"title": "带滑动条",
"type": "number",
"widget": "slider"
},
"rate": {
"title": "评价",
"type": "number",
"widget": "rate"
}
}
},
"allBoolean": {
"title": "boolean类",
"type": "object",
"properties": {
"radio": {
"title": "是否通过",
"type": "boolean"
},
"switch": {
"title": "开关控制",
"type": "boolean",
"widget": "switch"
}
}
},
"allEnum": {
"title": "选择类",
"type": "object",
"properties": {
"select": {
"title": "单选",
"type": "string",
"enum": ["a", "b", "c"],
"enumNames": ["早", "中", "晚"],
"default": "a",
"widget": "select"
},
"radio": {
"title": "单选",
"type": "string",
"enum": ["a", "b", "c"],
"enumNames": ["早", "中", "晚"],
"widget": "radio"
},
"multiSelect": {
"title": "多选",
"tooltip": "下拉多选",
"type": "array",
"items": {
"type": "string"
},
"enum": ["A", "B", "C", "D"],
"enumNames": ["杭州", "武汉", "湖州", "贵阳"],
"widget": "multiSelect"
},
"boxes": {
"title": "多选",
"tooltip": "checkbox",
"type": "array",
"items": {
"type": "string"
},
"enum": ["A", "B", "C", "D"],
"enumNames": ["杭州", "武汉", "湖州", "贵阳"],
"widget": "checkboxes"
}
}
},
"listName2": {
"title": "对象数组",
"description": "对象数组嵌套功能",
"type": "array",
"min": 1,
"max": 3,
"items": {
"type": "object",
"properties": {
"input1": {
"title": "简单输入框",
"type": "string"
},
"select1": {
"title": "单选",
"type": "string",
"enum": ["a", "b", "c"],
"enumNames": ["早", "中", "晚"]
}
}
}
}
}
}
}
|