@hi-ui/menu 4.0.0-beta.16 → 4.0.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/types/Menu.d.ts +46 -4
- package/lib/types/types.d.ts +2 -2
- package/package.json +4 -4
package/lib/types/Menu.d.ts
CHANGED
|
@@ -6,18 +6,60 @@ import { MenuDataItem } from './types';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const Menu: React.ForwardRefExoticComponent<MenuProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
8
8
|
export interface MenuProps extends Omit<HiBaseHTMLProps<'div'>, 'onClick'> {
|
|
9
|
+
/**
|
|
10
|
+
* 菜单项数据列表
|
|
11
|
+
*/
|
|
9
12
|
data: MenuDataItem[];
|
|
13
|
+
/**
|
|
14
|
+
* 默认激活的菜单项 id
|
|
15
|
+
*/
|
|
16
|
+
defaultActiveId?: React.ReactText;
|
|
17
|
+
/**
|
|
18
|
+
* 激活的菜单项 id
|
|
19
|
+
*/
|
|
10
20
|
activeId?: React.ReactText;
|
|
21
|
+
/**
|
|
22
|
+
* 设置菜单水平或垂直展示
|
|
23
|
+
*/
|
|
11
24
|
placement?: 'horizontal' | 'vertical';
|
|
25
|
+
/**
|
|
26
|
+
* 是否收起子菜单,菜单垂直展示时有效
|
|
27
|
+
*/
|
|
12
28
|
collapsed?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 是否显示收缩开关,菜单垂直展示时有效
|
|
31
|
+
*/
|
|
13
32
|
showCollapse?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 是否以胖菜单的形式展开所有子菜单(仅在水平菜单时有效)
|
|
35
|
+
*/
|
|
14
36
|
showAllSubMenus?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 手风琴模式,菜单水平展示时有效
|
|
39
|
+
*/
|
|
15
40
|
accordion?: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
41
|
+
/**
|
|
42
|
+
* 下拉框根类名
|
|
43
|
+
*/
|
|
19
44
|
overlayClassName?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 弹出层展开方式
|
|
47
|
+
*/
|
|
20
48
|
expandedType?: 'collapse' | 'pop';
|
|
49
|
+
/**
|
|
50
|
+
* 默认展开菜单项 ids 列表
|
|
51
|
+
*/
|
|
21
52
|
defaultExpandedIds?: React.ReactText[];
|
|
22
|
-
|
|
53
|
+
/**
|
|
54
|
+
* 点击菜单选项时的回调
|
|
55
|
+
*/
|
|
56
|
+
onClick?: (menuId: React.ReactText) => void;
|
|
57
|
+
/**
|
|
58
|
+
* 点击父菜单项时的回调
|
|
59
|
+
*/
|
|
60
|
+
onClickSubMenu?: (subMenuId: React.ReactText, expandedIds: React.ReactText[]) => void;
|
|
61
|
+
/**
|
|
62
|
+
* 点击收缩开关时的回调
|
|
63
|
+
*/
|
|
64
|
+
onCollapse?: (collapsed: boolean) => void;
|
|
23
65
|
}
|
package/lib/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/menu",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.17",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HIUI <mi-hiui@xiaomi.com>",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"@hi-ui/core-css": "^4.0.0-beta.5",
|
|
50
50
|
"@hi-ui/env": "^4.0.0-beta.0",
|
|
51
51
|
"@hi-ui/icons": "^4.0.0-beta.10",
|
|
52
|
-
"@hi-ui/popper": "^4.0.0-beta.
|
|
52
|
+
"@hi-ui/popper": "^4.0.0-beta.14",
|
|
53
53
|
"@hi-ui/times": "^4.0.0-beta.5",
|
|
54
|
-
"@hi-ui/tooltip": "^4.0.0-beta.
|
|
54
|
+
"@hi-ui/tooltip": "^4.0.0-beta.18",
|
|
55
55
|
"@hi-ui/type-assertion": "^4.0.0-beta.4",
|
|
56
56
|
"@hi-ui/use-merge-refs": "^4.0.0-beta.4",
|
|
57
57
|
"@hi-ui/use-uncontrolled-state": "^4.0.0-beta.4",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react": "^17.0.1",
|
|
67
67
|
"react-dom": "^17.0.1"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "64cc3305632f0d88f852f4a95cba7c27ff388a2d"
|
|
70
70
|
}
|