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
286 lines (286 loc) · 7.44 KB
/
meta.ts
File metadata and controls
286 lines (286 loc) · 7.44 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
module.exports = {
group: '原子组件',
componentName: 'Menu',
title: '菜单',
docUrl: '',
screenshot: '',
npm: {
package: '@alifd/next',
version: '{{version}}',
exportName: 'Menu',
main: '',
destructuring: true,
subName: '',
},
props: [
{
name: 'onItemClick',
propType: 'func',
description:
'点击菜单项触发的回调函数\n@param {String} key 点击的菜单项的 key 值\n@param {Object} item 点击的菜单项对象\n@param {Object} event 点击的事件对象',
},
{
name: 'defaultOpenAll',
propType: 'bool',
description:
"初始展开所有的子菜单,只在 mode 设置为 'inline' 以及 openMode 设置为 'multiple' 下生效,优先级高于 defaultOpenKeys",
defaultValue: false,
},
{
name: 'onOpen',
propType: 'func',
description:
'打开或关闭子菜单触发的回调函数\n@param {String} key 打开的所有子菜单的 key 值\n@param {Object} extra 额外参数\n@param {String} extra.key 当前操作子菜单的 key 值\n@param {Boolean} extra.open 是否是打开',
},
{
name: 'mode',
propType: {
type: 'oneOf',
value: ['inline', 'popup'],
},
description: '子菜单打开的模式',
defaultValue: 'inline',
},
{
name: 'triggerType',
propType: {
type: 'oneOf',
value: ['click', 'hover'],
},
description: '子菜单打开的触发行为',
defaultValue: 'click',
},
{
name: 'openMode',
propType: {
type: 'oneOf',
value: ['single', 'multiple'],
},
description:
'展开内连子菜单的模式,同时可以展开一个子菜单还是多个子菜单,该属性仅在 mode 为 inline 时生效',
defaultValue: 'multiple',
},
{
name: 'inlineIndent',
propType: 'number',
description: '内连子菜单缩进距离',
defaultValue: 20,
},
{
name: 'inlineArrowDirection',
propType: {
type: 'oneOf',
value: ['down', 'right'],
},
defaultValue: 'down',
},
{
name: 'popupAutoWidth',
propType: 'bool',
description:
'是否自动让弹层的宽度和菜单项保持一致,如果弹层的宽度比菜单项小则和菜单项保持一致,如果宽度大于菜单项则不做处理',
defaultValue: false,
},
{
name: 'popupAlign',
propType: {
type: 'oneOf',
value: ['follow', 'outside'],
},
description: '弹层的对齐方式',
defaultValue: 'follow',
},
{
name: 'popupClassName',
propType: 'string',
description: '弹出子菜单自定义 className',
},
{
name: 'onSelect',
propType: 'func',
description:
'选中或取消选中菜单项触发的回调函数\n@param {Array} selectedKeys 选中的所有菜单项的值\n@param {Object} item 选中或取消选中的菜单项\n@param {Object} extra 额外参数\n@param {Boolean} extra.select 是否是选中\n@param {Array} extra.key 菜单项的 key\n@param {Object} extra.label 菜单项的文本\n@param {Array} extra.keyPath 菜单项 key 的路径',
},
{
name: 'selectMode',
propType: {
type: 'oneOf',
value: ['single', 'multiple'],
},
description: '选中模式,单选还是多选,默认无值,不可选',
},
{
name: 'shallowSelect',
propType: 'bool',
description: '是否只能选择第一层菜单项(不能选择子菜单中的菜单项)',
defaultValue: false,
},
{
name: 'hasSelectedIcon',
propType: 'bool',
description: '是否显示选中图标,如果设置为 false 需配合配置平台设置选中时的背景色以示区分',
defaultValue: true,
},
{
name: 'labelToggleChecked',
propType: 'bool',
defaultValue: true,
},
{
name: 'isSelectIconRight',
propType: 'bool',
description:
'是否将选中图标居右,仅当 hasSelectedIcon 为true 时生效。\n注意:SubMenu 上的选中图标一直居左,不受此API控制',
defaultValue: false,
},
{
name: 'direction',
propType: {
type: 'oneOf',
value: ['ver', 'hoz'],
},
description: '菜单第一层展示方向',
defaultValue: 'ver',
},
{
name: 'hozAlign',
propType: {
type: 'oneOf',
value: ['left', 'right'],
},
description:
"横向菜单条 item 和 footer 的对齐方向,在 direction 设置为 'hoz' 并且 header 存在时生效",
defaultValue: 'left',
},
{
name: 'hozInLine',
propType: 'bool',
description:
"横向菜单模式下,是否维持在一行,即超出一行折叠成 SubMenu 显示, 仅在 direction='hoz' mode='popup' 时生效",
defaultValue: false,
},
{
name: 'header',
propType: 'node',
description: '自定义菜单头部',
},
{
name: 'footer',
propType: 'node',
description: '自定义菜单尾部',
},
{
name: 'autoFocus',
propType: 'bool',
description: '是否自动获得焦点',
defaultValue: false,
},
{
name: 'focusedKey',
propType: 'string',
description: '当前获得焦点的子菜单或菜单项 key 值',
},
{
name: 'focusable',
propType: 'bool',
defaultValue: true,
},
{
name: 'onItemFocus',
propType: 'func',
},
{
name: 'onBlur',
propType: 'func',
},
{
name: 'embeddable',
propType: 'bool',
description:
"是否开启嵌入式模式,一般用于Layout的布局中,开启后没有默认背景、外层border、box-shadow,可以配合`<Menu style={{lineHeight: '100px'}}>` 自定义高度",
defaultValue: false,
},
{
name: 'onItemKeyDown',
propType: 'func',
},
{
name: 'expandAnimation',
propType: 'bool',
defaultValue: true,
},
{
name: 'itemClassName',
propType: 'string',
},
{
name: 'style',
propType: 'object',
},
{
name: 'openKeys',
propType: {
type: 'oneOfType',
value: [
'string',
{
type: 'arrayOf',
value: 'string',
},
],
},
description: '当前打开的子菜单的 key 值',
},
{
name: 'defaultOpenKeys',
propType: {
type: 'oneOfType',
value: [
'string',
{
type: 'arrayOf',
value: 'string',
},
],
},
description: '初始打开的子菜单的 key 值',
defaultValue: [],
},
{
name: 'selectedKeys',
propType: {
type: 'oneOfType',
value: [
'string',
{
type: 'arrayOf',
value: 'string',
},
],
},
description: '当前选中菜单项的 key 值',
},
{
name: 'defaultSelectedKeys',
propType: {
type: 'oneOfType',
value: [
'string',
{
type: 'arrayOf',
value: 'string',
},
],
},
description: '初始选中菜单项的 key 值',
defaultValue: [],
},
],
configure: {
component: {
isContainer: true,
},
},
icon: '',
category: '信息输入',
};