update Menu
update Menu
This commit is contained in:
parent
fc3ffbe08d
commit
f9d87766ca
3 changed files with 45 additions and 46 deletions
|
@ -78,7 +78,7 @@
|
|||
groupItem.active = false;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
} else if (subitem.$options.name === 'MenuItem') {
|
||||
if (subitem.key === this.activeKey) {
|
||||
subitem.active = true;
|
||||
subitem.$parent.active = true;
|
||||
|
@ -91,7 +91,7 @@
|
|||
item.$children.forEach(groupItem => {
|
||||
groupItem.active = groupItem.key === this.activeKey;
|
||||
})
|
||||
} else {
|
||||
} else if (item.$options.name === 'MenuItem') {
|
||||
item.active = item.key === this.activeKey;
|
||||
}
|
||||
})
|
||||
|
|
|
@ -121,11 +121,11 @@
|
|||
&-item-group{
|
||||
line-height: normal;
|
||||
&-title {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 8px;
|
||||
font-size: @font-size-small;
|
||||
color: @legend-color;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
& > ul{
|
||||
|
@ -166,6 +166,8 @@
|
|||
}
|
||||
&-vertical &-item-group{
|
||||
&-title{
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
font-size: @font-size-base;
|
||||
padding-left: 28px;
|
||||
}
|
||||
|
@ -223,4 +225,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.select-item(@menu-prefix-cls, @menu-dropdown-item-prefix-cls);
|
||||
.select-item(@menu-prefix-cls, @menu-dropdown-item-prefix-cls);
|
||||
|
||||
.@{menu-dropdown-item-prefix-cls} {
|
||||
padding: 7px 16px 8px;
|
||||
font-size: @font-size-base !important;
|
||||
}
|
|
@ -1,55 +1,47 @@
|
|||
<template>
|
||||
<Row>
|
||||
<i-col span="8">
|
||||
<Menu :theme="theme2">
|
||||
<Submenu key="1">
|
||||
<template slot="title">
|
||||
<Icon type="ios-paper"></Icon>
|
||||
内容管理
|
||||
</template>
|
||||
<Menu-item key="1-1">文章管理</Menu-item>
|
||||
<Menu-item key="1-2">评论管理</Menu-item>
|
||||
<Menu-item key="1-3">举报管理</Menu-item>
|
||||
</Submenu>
|
||||
<Submenu key="2">
|
||||
<template slot="title">
|
||||
<Icon type="ios-people"></Icon>
|
||||
用户管理
|
||||
</template>
|
||||
<Menu-item key="2-1">新增用户</Menu-item>
|
||||
<Menu-item key="2-2">活跃用户</Menu-item>
|
||||
</Submenu>
|
||||
<Submenu key="3">
|
||||
<template slot="title">
|
||||
<Icon type="stats-bars"></Icon>
|
||||
统计分析
|
||||
</template>
|
||||
<Menu-group title="使用">
|
||||
<Menu-item key="3-1">新增和启动</Menu-item>
|
||||
<Menu-item key="3-2">活跃分析</Menu-item>
|
||||
<Menu-item key="3-3">时段分析</Menu-item>
|
||||
</Menu-group>
|
||||
<Menu-group title="留存">
|
||||
<Menu-item key="3-4">用户留存</Menu-item>
|
||||
<Menu-item key="3-5">流失用户</Menu-item>
|
||||
</Menu-group>
|
||||
</Submenu>
|
||||
</Menu>
|
||||
</i-col>
|
||||
|
||||
</Row>
|
||||
<Menu mode="horizontal" :theme="theme1" active-key="1">
|
||||
<i-button>test</i-button>
|
||||
<Menu-item key="1">
|
||||
<Icon type="ios-paper"></Icon>
|
||||
内容管理
|
||||
</Menu-item>
|
||||
<Menu-item key="2">
|
||||
<Icon type="ios-people"></Icon>
|
||||
用户管理
|
||||
</Menu-item>
|
||||
<Submenu key="3">
|
||||
<template slot="title">
|
||||
<Icon type="stats-bars"></Icon>
|
||||
统计分析
|
||||
</template>
|
||||
<Menu-group title="使用">
|
||||
<Menu-item key="3-1">新增和启动</Menu-item>
|
||||
<Menu-item key="3-2">活跃分析</Menu-item>
|
||||
<Menu-item key="3-3">时段分析</Menu-item>
|
||||
</Menu-group>
|
||||
<Menu-group title="留存">
|
||||
<Menu-item key="3-4">用户留存</Menu-item>
|
||||
<Menu-item key="3-5">流失用户</Menu-item>
|
||||
</Menu-group>
|
||||
</Submenu>
|
||||
<Menu-item key="4">
|
||||
<Icon type="settings"></Icon>
|
||||
综合设置
|
||||
</Menu-item>
|
||||
</Menu>
|
||||
<br>
|
||||
<p>切换主题</p>
|
||||
<Radio-group :model.sync="theme2">
|
||||
<Radio-group :model.sync="theme1">
|
||||
<Radio value="light"></Radio>
|
||||
<Radio value="dark"></Radio>
|
||||
<Radio value="primary"></Radio>
|
||||
</Radio-group>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
theme2: 'light'
|
||||
theme1: 'light'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue