# text
# Schema
类静态属性
Schema
类静态属性请访问 Schema.js类静态属性 及 值逻辑与事件逻辑关系
{
widget: 'text',
title: '文本',
preview: '',
logic: {
value: null,
event: null
}
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# schema.option
定义
schema
完整定义请访问schema
{
"content": "" // 文本内容
}
1
2
3
2
3
content
中支持花括号 {{}}
表达式,支持js
语法,通过$f
获取当前表单值对象:
# 示例展示
# 表达式计算展示
- 完整schema
{
"key": "kuEXemrCZ",
"widget": "grid",
"hidden": false,
"option": {},
"label": {
"width": 80,
"position": "right",
"colon": false
},
"container": true,
"children": [
{
"span": 24,
"list": [
{
"key": "kGZLjx5Vx",
"widget": "inputNumber",
"hidden": false,
"option": {
"password": false,
"prefix": "",
"suffix": ""
},
"name": "count",
"type": "number",
"label": "数量",
"description": "",
"help": "",
"disabled": false,
"rules": [
{
"required": false,
"message": "必填",
"type": "number",
"trigger": "blur"
}
],
"placeholder": "请选择..."
},
{
"key": "kGZLjx2Vx",
"widget": "inputNumber",
"hidden": false,
"option": {
"password": false,
"prefix": "",
"suffix": ""
},
"name": "price",
"type": "number",
"label": "价格",
"description": "",
"help": "",
"disabled": false,
"rules": [
{
"required": false,
"message": "必填",
"type": "number",
"trigger": "blur"
}
],
"placeholder": "请选择..."
},
{
"key": "kGZLjx532",
"widget": "text",
"hidden": false,
"option": {
"content": "总计:{{$f.count * $f.price}} 元"
},
"style": {
"text-align": "right"
}
}
]
}
],
"title": "",
"description": "",
"size": "default",
"logics": [],
"style": {
}
}
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
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
← button