File size: 2,133 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
{
  "schema": {
    "type": "object",
    "properties": {
      "string": {
        "title": "字符串",
        "description": "带清空x按钮",
        "type": "string",
        "default": "hello world",
        "props": {
          "allowClear": true
        },
        "width": "50%"
      },
      "string2": {
        "title": "复杂校验",
        "description": "pattern和message的用法",
        "type": "string",
        "rules": [
          { "pattern": "^[A-Za-z0-9]+$", "message": "请输入数字或英文字母" }
        ],
        "placeholder": "请输入数字或英文",
        "width": "50%"
      },
      "string3": {
        "title": "长度控制",
        "description": "长度在5-15个字之间",
        "type": "string",
        "minLength": 5,
        "maxLength": 15,
        "width": "50%"
      },
      "string4": {
        "title": "前置/后置标签",
        "type": "string",
        "props": {
          "addonBefore": "长度",
          "addonAfter": "px"
        },
        "width": "50%"
      },
      "string5": {
        "title": "前后缀",
        "type": "string",
        "rules": [
          {
            "pattern": "^[0-9]+$",
            "message": "请输入数字"
          }
        ],
        "props": {
          "prefix": "¥",
          "suffix": "RMB"
        },
        "width": "50%"
      },
      "string6": {
        "title": "置灰的输入框",
        "type": "string",
        "disabled": true,
        "default": "hello world",
        "width": "50%"
      },
      "string7": {
        "title": "文本框",
        "description": "固定高度",
        "type": "string",
        "format": "textarea",
        "props": {
          "row": 4
        }
      },
      "string8": {
        "title": "文本框",
        "description": "自动高度",
        "type": "string",
        "format": "textarea",
        "placeholder": "根据内容缩放",
        "props": {
          "autoSize": {
            "minRows": 3,
            "maxRows": 5
          }
        }
      }
    },
    "required": ["string4", "string5"]
  },
  "formData": {}
}