# switch
# Schema
类静态属性
Schema
类静态属性请访问 Schema.js类静态属性 及 值逻辑与事件逻辑关系
{
widget: 'switch',
title: '开关',
preview: '',
type: 'boolean',
validators: [],
logic: {
value: ['=', '!='],
event: []
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# schema.default
默认false
# schema.option
定义
schema
完整定义请访问schema
{
"open": "开", // 选中时的内容
"close": "关" // 非选中时的内容
}
1
2
3
4
2
3
4
# 示例展示
- schema
{
"key": "k0CyR07yT",
"widget": "switch",
"hidden": false,
"option": {
"open": "是",
"close": "否"
},
"name": "disabled",
"type": "boolean",
"label": "是否禁用",
"description": "",
"help": "",
"disabled": false,
"rules": [
{
"required": false,
"message": "必填",
"type": "boolean",
"trigger": "change"
}
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
← timePicker rate →