docs: update menu demo

pull/304/head
tangjinzhou 2018-12-13 09:40:41 +08:00
parent d0612fdfb9
commit 7747a3f149
3 changed files with 10 additions and 5 deletions

View File

@ -130,9 +130,14 @@ exports[`renders ./components/menu/demo/template.md correctly 1`] = `
<div style="width: 256px;"><button type="button" class="ant-btn ant-btn-primary" style="margin-bottom: 16px;"><i class="anticon anticon-menu-fold"></i></button>
<ul class="ant-menu ant-menu-inline ant-menu-root ant-menu-dark" role="menu">
<li role="menuitem" class="ant-menu-item ant-menu-item-selected" style="padding-left: 24px;"><i class="anticon anticon-pie-chart"></i> <span>Option 1</span></li>
<li role="menuitem" class="ant-menu-submenu ant-menu-submenu-inline" menuinfo="[object Object]">
<div aria-haspopup="true" class="ant-menu-submenu-title" style="padding-left: 24px;"><span><i class="anticon anticon-mail"></i><span>Navigation 2</span></span><i class="ant-menu-submenu-arrow"></i></div>
<div></div>
<li role="menuitem" class="ant-menu-submenu ant-menu-submenu-inline ant-menu-submenu-open">
<div aria-expanded="true" aria-owns="2$Menu" aria-haspopup="true" class="ant-menu-submenu-title" style="padding-left: 24px;"><span><i class="anticon anticon-mail"></i><span>Navigation 2</span></span><i class="ant-menu-submenu-arrow"></i></div>
<ul class="ant-menu ant-menu-inline ant-menu-sub" role="menu">
<li role="menuitem" class="ant-menu-submenu ant-menu-submenu-inline">
<div aria-haspopup="true" class="ant-menu-submenu-title" style="padding-left: 48px;"><span><i class="anticon anticon-mail"></i><span>Navigation 3</span></span><i class="ant-menu-submenu-arrow"></i></div>
<div></div>
</li>
</ul>
</li>
</ul>
</div>

View File

@ -1,5 +1,5 @@
<template functional>
<a-sub-menu v-on="listeners" v-bind="data.attrs" :key="data.key">
<a-sub-menu v-on="listeners" :key="data.key">
<span slot="title"><a-icon type="mail" /><span>{{data.attrs.menuInfo.title}}</span></span>
<template v-for="item in data.attrs.menuInfo.children">
<a-menu-item v-if="!item.children" :key="item.key">

View File

@ -18,7 +18,7 @@ The properties of `a-sub-menu` are dynamically changed inside the component. If
</a-button>
<a-menu
:defaultSelectedKeys="['1']"
:defaultOpenKeys="['sub1']"
:defaultOpenKeys="['2']"
mode="inline"
theme="dark"
:inlineCollapsed="collapsed"