forked from alibaba/lowcode-materials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.ts
More file actions
229 lines (228 loc) · 5.4 KB
/
meta.ts
File metadata and controls
229 lines (228 loc) · 5.4 KB
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
import snippets from './snippets';
export default {
group: '原子组件',
componentName: 'Switch',
title: '开关',
docUrl: '',
screenshot: '',
npm: {
package: '@alifd/next',
version: '{{version}}',
exportName: 'Switch',
main: '',
destructuring: true,
subName: '',
},
props: [
{
name: 'id',
propType: 'string',
},
{
name: 'name',
propType: 'string',
description: 'name',
},
{
name: 'className',
propType: 'string',
description: '自定义类名',
},
{
name: 'style',
propType: 'object',
description: '自定义内敛样式',
},
{
name: 'checked',
propType: 'bool',
description: '当前状态',
},
{
name: 'disabled',
propType: 'bool',
description: '是否禁用',
defaultValue: false,
},
{
name: 'size',
propType: {
type: 'oneOf',
value: ['medium', 'small'],
},
description: '尺寸',
defaultValue: 'medium',
},
{
name: 'checkedChildren',
propType: 'string',
description: '打开时的内容',
},
{
name: 'unCheckedChildren',
propType: 'string',
description: '关闭时的内容',
},
{
name: 'onChange',
propType: 'func',
description:
'开关状态改变是触发此事件\n@param {Boolean} checked 是否为打开状态\n@param {Event} e DOM事件对象',
},
{
name: 'onClick',
propType: 'func',
description: '鼠标点击事件\n@param {Event} e DOM事件对象',
},
{
name: 'onKeyDown',
propType: 'func',
description: '键盘按键事件\n@param {Event} e DOM事件对象',
},
],
configure: {
props: [
{
name: 'checked',
title: {
label: {
type: 'i18n',
zh_CN: '当前状态',
en_US: 'Checked',
},
tip: {
type: 'i18n',
zh_CN: '属性: checked | 说明: 当前状态',
en_US: 'prop: checked | description: current status',
},
},
setter: 'BoolSetter',
supportVariable: true,
},
{
name: 'disabled',
title: {
label: {
type: 'i18n',
zh_CN: '是否禁用',
en_US: 'Disabled',
},
tip: {
type: 'i18n',
zh_CN: '属性: disabled | 说明: 是否被禁用',
en_US: 'prop: disabled | description: disabled',
},
},
setter: 'BoolSetter',
supportVariable: true,
description: '是否禁用',
defaultValue: false,
},
{
name: 'size',
title: {
label: {
type: 'i18n',
zh_CN: '尺寸',
en_US: 'Size',
},
tip: {
type: 'i18n',
zh_CN: '属性: size | 说明: 尺寸',
en_US: 'prop: size | description: size',
},
},
setter: {
componentName: 'RadioGroupSetter',
props: {
options: ['medium', 'small'],
},
},
defaultValue: 'medium',
},
{
name: 'checkedChildren',
title: {
label: {
type: 'i18n',
zh_CN: '开启内容',
en_US: 'Checked Content',
},
tip: {
type: 'i18n',
zh_CN: '属性: checkedChildren | 说明: 打开时的内容',
en_US: 'prop: checkedChildren | description: checked content',
},
},
setter: 'StringSetter',
supportVariable: true,
description: '打开时的内容',
},
{
name: 'unCheckedChildren',
title: {
label: {
type: 'i18n',
zh_CN: '关闭内容',
en_US: 'UnChecked Content',
},
tip: {
type: 'i18n',
zh_CN: '属性: unCheckedChildren | 说明: 关闭时的内容',
en_US: 'prop: unCheckedChildren | description: unchecked content',
},
},
setter: 'StringSetter',
supportVariable: true,
},
{
type: 'group',
title: '高级',
display: 'block',
items: [
{
name: 'id',
title: {
label: {
type: 'i18n',
zh_CN: '唯一标识',
en_US: 'ID',
},
tip: {
type: 'i18n',
zh_CN: '属性: id | 说明: 唯一标识',
en_US: 'prop: id | description: switch id',
},
},
setter: 'StringSetter',
supportVariable: true,
},
{
name: 'name',
title: {
label: {
type: 'i18n',
zh_CN: '表单标识',
en_US: 'Name',
},
tip: {
type: 'i18n',
zh_CN: '属性: name | 说明: 表单标识',
en_US: 'prop: name | description: switch name',
},
},
setter: 'StringSetter',
supportVariable: true,
},
],
},
],
supports: {
style: true,
events: ['onChange', 'onClick', 'onKeyDown'],
},
},
icon: '',
category: '信息输入',
snippets,
};