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
247 lines (247 loc) · 5.85 KB
/
meta.ts
File metadata and controls
247 lines (247 loc) · 5.85 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
module.exports = {
group: '原子组件',
componentName: 'Select',
title: '选择器',
docUrl: '',
screenshot: '',
npm: {
package: '@alifd/next',
version: '{{version}}',
exportName: 'Select',
main: '',
destructuring: true,
subName: '',
},
props: [
{
name: 'placeholder',
title: {
label: '占位提示',
tip: '属性: placeholder',
},
defaultValue: '请选择', // 不生效
propType: 'string',
},
{
name: 'defaultValue',
title: {
label: '默认值',
tip: '属性: defaultValue',
},
propType: 'string',
},
{
name: 'mode',
propType: {
type: 'oneOf',
value: ['single', 'multiple', 'tag'],
},
description: '选择器模式',
},
{
name: 'hasClear',
title: {
label: '清除按钮',
tip: '属性: hasClear',
},
propType: 'bool',
defaultValue: false,
},
{
name: 'showSearch',
title: {
label: '可搜索',
tip: '属性: showSearch',
},
propType: 'bool',
defaultValue: false,
},
{
name: 'dataSource',
},
{
type: 'group',
title: '其他配置',
display: 'block',
items: [
{
name: 'notFoundContent',
title: {
label: '空文案',
tip: 'notFoundContent|弹层内容为空的文案',
},
setter: 'StringSetter',
supportVariable: true,
description: '弹层内容为空的文案',
},
{
name: 'hasBorder',
title: {
label: '边框',
tip: '是否有边框',
},
propType: 'bool',
setter: 'BoolSetter',
supportVariable: true,
description: '是否有边框',
},
{
name: 'autoWidth',
title: '下拉等宽',
propType: 'bool',
setter: 'BoolSetter',
supportVariable: true,
},
{
name: 'hasArrow',
title: '下拉箭头',
propType: 'bool',
setter: 'BoolSetter',
supportVariable: true,
description: '是否有下拉箭头',
defaultValue: 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,
},
],
},
],
configure: {
props: {
isExtends: true,
override: [
{
name: 'dataSource',
display: 'block',
title: '选项',
tip: {
title: '数据格式',
url: '',
},
setter: {
componentName: 'MixedSetter',
props: {
setters: [
{
componentName: 'ArraySetter',
props: {
itemSetter: {
componentName: 'ObjectSetter',
props: {
config: {
items: [
{
name: 'label',
title: 'label',
setter: 'StringSetter',
supportVariable: true,
},
{
name: 'value',
title: 'value',
setter: 'StringSetter',
supportVariable: true,
},
],
},
},
initialValue: {
title: 'Title',
},
},
},
},
'ExpressionSetter',
],
},
},
},
{
name: 'mode',
title: {
label: '模式',
tip: '属性: mode',
},
setter: {
componentName: 'RadioGroupSetter',
props: {
defaultValue: 'single',
options: [
{ value: 'single', title: '单选' },
{ value: 'multiple', title: '多选' },
{ value: 'tag', title: '标签' },
],
},
},
},
],
},
supports: {
style: true,
events: [
{
name: 'onChange',
propType: 'func',
description: '值发生变化',
},
{
name: 'onVisibleChange',
propType: 'func',
description: '弹层显示隐藏变化',
},
{
name: 'onRemove',
propType: 'func',
description: 'Tag 被删除',
},
{
name: 'onSearch',
propType: 'func',
description: '搜索',
},
],
},
},
icon: '',
category: '信息输入',
snippets: require('./snippets'),
};