Skip to content

Commit b14ae3d

Browse files
committed
docs: update menu doc
1 parent 27773fa commit b14ae3d

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

components/menu/index.en-US.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@
5252

5353
| Param | Description | Type | Default value |
5454
| ----- | ----------- | ---- | ------------- |
55-
| children | sub menus or sub menu items | Array<MenuItem\|SubMenu> | |
5655
| disabled | whether sub menu is disabled or not | boolean | false |
5756
| key | unique id of the sub menu | string | |
5857
| title | title of the sub menu | string\|slot | |
5958

59+
The children of Menu.SubMenu must be `MenuItem` or `SubMenu`.
60+
6061
### Menu.SubMenu Events
6162
| Events Name | Description | Arguments |
6263
| --- | --- | --- |
@@ -69,6 +70,8 @@
6970
| children | sub menu items | MenuItem\[] | |
7071
| title | title of the group | string\|slot | |
7172

73+
The children of Menu.ItemGroup must be `MenuItem`.
74+
7275
### Menu.Divider
7376

7477
Divider line in between menu items, only used in vertical popup Menu or Dropdown Menu.

components/menu/index.zh-CN.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@
5050

5151
| 参数 | 说明 | 类型 | 默认值 |
5252
| --- | --- | --- | --- |
53-
| children | 子菜单的菜单项 | Array<MenuItem\|SubMenu> | |
5453
| disabled | 是否禁用 | boolean | false |
5554
| key | 唯一标志 | string | |
5655
| title | 子菜单项值 | string\|slot | |
5756

57+
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.
58+
5859
### SubMenu事件
5960
| 事件名称 | 说明 | 回调参数 |
61+
| --- | --- | --- |
6062
| titleClick | 点击子菜单标题 | ({ key, domEvent }) |
6163

6264
### Menu.ItemGroup
@@ -65,6 +67,8 @@
6567
| --- | --- | --- | --- |
6668
| title | 分组标题 | string\|\|function\|slot | |
6769

70+
Menu.ItemGroup 的子元素必须是 `MenuItem`.
71+
6872
### Menu.Divider
6973

7074
菜单项分割线,只用在弹出菜单内。

scripts/gulpfile.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ function copyHtml() {
6060
path.join(cwd, 'site-dist/index-cn.html'),
6161
fs.readFileSync(path.join(cwd, 'site-dist/index.html')),
6262
);
63-
fs.writeFileSync(
64-
path.join(cwd, 'site-dist/CNAME'),
65-
'vue.ant.design',
66-
);
63+
fs.writeFileSync(path.join(cwd, 'site-dist/CNAME'), 'vue.ant.design');
6764
rl.on('line', line => {
6865
if (line.indexOf('path:') > -1) {
6966
const name = line.split("'")[1].split("'")[0];

types/menu/sub-menu.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ export declare class SubMenu extends AntdComponent {
1919
*/
2020
disabled: boolean;
2121

22-
/**
23-
* sub menus or sub menu items
24-
* @type Array<MenuItem | SubMenu>
25-
*/
26-
children: Array<MenuItem | SubMenu>;
27-
2822
/**
2923
* title of the sub menu
3024
* @type string | slot

0 commit comments

Comments
 (0)