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 | | 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 | | disabled | whether sub menu is disabled or not | boolean | false |
| key | unique id of the sub menu | string | | | key | unique id of the sub menu | string | |
| title | title of the sub menu | string\|slot | | | title | title of the sub menu | string\|slot | |
The children of Menu.SubMenu must be `MenuItem` or `SubMenu`.
### Menu.SubMenu Events ### Menu.SubMenu Events
| Events Name | Description | Arguments | | Events Name | Description | Arguments |
| --- | --- | --- | | --- | --- | --- |
@ -69,6 +70,8 @@
| children | sub menu items | MenuItem\[] | | | children | sub menu items | MenuItem\[] | |
| title | title of the group | string\|slot | | | title | title of the group | string\|slot | |
The children of Menu.ItemGroup must be `MenuItem`.
### Menu.Divider ### Menu.Divider
Divider line in between menu items, only used in vertical popup Menu or Dropdown Menu. 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 | | disabled | 是否禁用 | boolean | false |
| key | 唯一标志 | string | | | key | 唯一标志 | string | |
| title | 子菜单项值 | string\|slot | | | title | 子菜单项值 | string\|slot | |
Menu.SubMenu 的子元素必须是 `MenuItem` 或者 `SubMenu`.
### SubMenu事件 ### SubMenu事件
| 事件名称 | 说明 | 回调参数 | | 事件名称 | 说明 | 回调参数 |
| --- | --- | --- |
| titleClick | 点击子菜单标题 | ({ key, domEvent }) | | titleClick | 点击子菜单标题 | ({ key, domEvent }) |
### Menu.ItemGroup ### Menu.ItemGroup
@ -65,6 +67,8 @@
| --- | --- | --- | --- | | --- | --- | --- | --- |
| title | 分组标题 | string\|\|function\|slot | | | title | 分组标题 | string\|\|function\|slot | |
Menu.ItemGroup 的子元素必须是 `MenuItem`.
### Menu.Divider ### Menu.Divider
菜单项分割线,只用在弹出菜单内。 菜单项分割线,只用在弹出菜单内。

View File

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

View File

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