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
359 lines (359 loc) · 8.92 KB
/
meta.ts
File metadata and controls
359 lines (359 loc) · 8.92 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
module.exports = {
group: '原子组件',
componentName: 'Input.TextArea',
title: '多行文本框',
docUrl: '',
screenshot: '',
npm: {
package: '@alifd/next',
version: '{{version}}',
exportName: 'Input',
main: '',
destructuring: true,
subName: 'TextArea',
},
props: [
{
name: 'hasBorder',
propType: 'bool',
description: '是否有边框',
defaultValue: true,
},
{
name: 'state',
propType: {
type: 'oneOf',
value: ['error', 'warning'],
},
description: '状态\n@enumdesc 错误',
},
{
name: 'autoHeight',
propType: 'bool',
description: '自动高度 true / {minRows: 2, maxRows: 4}',
defaultValue: false,
},
{
name: 'rows',
propType: 'number',
description:
'多行文本框高度 <br />(不要直接用height设置多行文本框的高度, ie9 10会有兼容性问题)',
defaultValue: 4,
},
{
name: 'isPreview',
propType: 'bool',
description: '是否为预览态',
defaultValue: false,
},
{
name: 'style',
propType: 'object',
},
{
name: 'onClear',
propType: 'func',
},
{
name: 'onChange',
propType: 'func',
},
{
name: 'onKeyDown',
propType: 'func',
},
{
name: 'onFocus',
propType: 'func',
},
{
name: 'onBlur',
propType: 'func',
},
],
configure: {
props: [
{
name: 'rows',
title: {
label: {
type: 'i18n',
zh_CN: '行数',
en_US: 'Rows',
},
tip: {
type: 'i18n',
zh_CN:
'属性: rows | 说明: 多行文本框高度 <br />(不要直接用height设置多行文本框的高度, ie9 10会有兼容性问题)',
en_US: 'prop: rows | description: row numbers',
},
},
setter: 'NumberSetter',
supportVariable: true,
defaultValue: 4,
},
{
name: 'maxLength',
title: {
label: {
type: 'i18n',
zh_CN: '最大长度',
en_US: 'MaxLength',
},
tip: {
type: 'i18n',
zh_CN: '属性: maxLength | 说明: 最大长度',
en_US: 'prop: maxLength | description: max length',
},
},
setter: 'NumberSetter',
supportVariable: true,
description: '最大长度',
},
{
name: 'placeholder',
title: {
label: {
type: 'i18n',
zh_CN: '输入提示',
en_US: 'Placeholder',
},
tip: {
type: 'i18n',
zh_CN: '属性: placeholder | 说明: 输入提示',
en_US: 'prop: placeholder | description: placeholder',
},
},
setter: 'StringSetter',
supportVariable: true,
},
{
name: 'state',
title: {
label: {
type: 'i18n',
zh_CN: '状态',
en_US: 'State',
},
tip: {
type: 'i18n',
zh_CN: '属性: state | 说明: 状态\n@enumdesc 错误',
en_US: 'prop: state | description: input state',
},
},
setter: {
componentName: 'RadioGroupSetter',
props: {
options: ['error', 'warning'],
},
},
},
{
name: 'autoHeight',
title: {
label: {
type: 'i18n',
zh_CN: '自动高度',
en_US: 'Auto Height',
},
tip: {
type: 'i18n',
zh_CN: '属性: autoHeight | 说明: 自动高度 true / {minRows: 2, maxRows: 4}',
en_US: 'prop: autoHeight | description: auto height',
},
},
setter: 'BoolSetter',
supportVariable: true,
defaultValue: false,
},
{
name: 'isPreview',
title: {
label: {
type: 'i18n',
zh_CN: '预览态',
en_US: 'Preview',
},
tip: {
type: 'i18n',
zh_CN: '属性: isPreview | 说明: 是否为预览态',
en_US: 'prop: isPreview | description: preview',
},
},
setter: 'BoolSetter',
supportVariable: true,
defaultValue: false,
},
{
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: '是否禁用',
},
{
name: 'hasLimitHint',
title: {
label: {
type: 'i18n',
zh_CN: '展示限制',
en_US: 'ShowLimit',
},
tip: {
type: 'i18n',
zh_CN: '属性: hasLimitHint | 说明: 是否展现最大长度样式',
en_US: 'prop: hasLimitHint | description: hasLimitHint',
},
},
setter: 'BoolSetter',
supportVariable: true,
description: '是否展现最大长度样式',
},
{
name: 'cutString',
title: {
label: {
type: 'i18n',
zh_CN: '是否截断',
en_US: 'Cut Off',
},
tip: {
type: 'i18n',
zh_CN: '属性: cutString | 说明: 是否截断超出字符串',
en_US: 'prop: cutString | description: whether cut off string',
},
},
setter: 'BoolSetter',
supportVariable: true,
description: '是否截断超出字符串',
},
{
name: 'readOnly',
title: {
label: {
type: 'i18n',
zh_CN: '是否只读',
en_US: 'ReadOnly',
},
tip: {
type: 'i18n',
zh_CN: '属性: readOnly | 说明: 是否只读',
en_US: 'prop: readOnly | description: ReadOnly',
},
},
setter: 'BoolSetter',
supportVariable: true,
description: '是否只读',
},
{
name: 'trim',
title: {
label: {
type: 'i18n',
zh_CN: '是否 Trim',
en_US: 'Trim',
},
tip: {
type: 'i18n',
zh_CN: '属性: trim | 说明: onChange返回会自动去除头尾空字符',
en_US: 'prop: trim | description: whether trim when onChange called',
},
},
setter: 'BoolSetter',
supportVariable: true,
},
{
name: 'hasBorder',
title: {
label: {
type: 'i18n',
zh_CN: '显示边框',
en_US: 'ShowBorder',
},
tip: {
type: 'i18n',
zh_CN: '属性: hasBorder | 说明: 是否有边框',
en_US: 'prop: hasBorder | description: HasBorder',
},
},
setter: 'BoolSetter',
supportVariable: true,
},
{
name: 'autoFocus',
title: {
label: {
type: 'i18n',
zh_CN: '自动聚焦',
en_US: 'Auto Focus',
},
tip: {
type: 'i18n',
zh_CN: '属性: autoFocus | 说明: 自动聚焦',
en_US: 'prop: autoFocus | description: autoFocus',
},
},
setter: 'BoolSetter',
supportVariable: true,
description: '自动聚焦',
},
{
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: ['onPressEnter', 'onClear', 'onChange', 'onKeyDown', 'onFocus', 'onBlur'],
},
},
category: '基础',
};