docs: update menu doc

pull/538/head
tangjinzhou 2019-02-21 17:49:21 +08:00
parent 27773fae20
commit b14ae3dd96
4 changed files with 10 additions and 12 deletions

View File

@ -52,11 +52,12 @@
| Param | Description | Type | Default value |
| ----- | ----------- | ---- | ------------- |
| children | sub menus or sub menu items | Array<MenuItem\|SubMenu> | |
| disabled | whether sub menu is disabled or not | boolean | false |
| key | unique id of the sub menu | string | |
| title | title of the sub menu | string\|slot | |
The children of Menu.SubMenu must be `MenuItem` or `SubMenu`.
### Menu.SubMenu Events
| Events Name | Description | Arguments |
| --- | --- | --- |
@ -69,6 +70,8 @@
| children | sub menu items | MenuItem\[] | |
| title | title of the group | string\|slot | |
The children of Menu.ItemGroup must be `MenuItem`.
### Menu.Divider
Divider line in between menu items, only used in vertical popup Menu or Dropdown Menu.

View File

@ -50,13 +50,15 @@
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| children | 子菜单的菜单项 | Array<MenuItem\|SubMenu> | |
| disabled | 是否禁用 | boolean | false |
| key | 唯一标志 | string | |
| title | 子菜单项值 | string\|slot | |
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.
### SubMenu事件
| 事件名称 | 说明 | 回调参数 |
| --- | --- | --- |
| titleClick | 点击子菜单标题 | ({ key, domEvent }) |
### Menu.ItemGroup
@ -65,6 +67,8 @@
| --- | --- | --- | --- |
| title | 分组标题 | string\|\|function\|slot | |
Menu.ItemGroup 的子元素必须是 `MenuItem`.
### Menu.Divider
菜单项分割线,只用在弹出菜单内。

View File

@ -60,10 +60,7 @@ function copyHtml() {
path.join(cwd, 'site-dist/index-cn.html'),
fs.readFileSync(path.join(cwd, 'site-dist/index.html')),
);
fs.writeFileSync(
path.join(cwd, 'site-dist/CNAME'),
'vue.ant.design',
);
fs.writeFileSync(path.join(cwd, 'site-dist/CNAME'), 'vue.ant.design');
rl.on('line', line => {
if (line.indexOf('path:') > -1) {
const name = line.split("'")[1].split("'")[0];

View File

@ -19,12 +19,6 @@ export declare class SubMenu extends AntdComponent {
*/
disabled: boolean;
/**
* sub menus or sub menu items
* @type Array<MenuItem | SubMenu>
*/
children: Array<MenuItem | SubMenu>;
/**
* title of the sub menu
* @type string | slot