进一步优化收缩菜单下拉菜单

This commit is contained in:
zhigang.li@tendcloud.com 2018-09-20 11:13:28 +08:00
parent 82b733a8e9
commit 5ed857d502
3 changed files with 28 additions and 21 deletions

View File

@ -1,5 +1,5 @@
<template>
<Dropdown ref="dropdown" @on-click="handleClick" class="collased-menu-dropdown" :transfer="hideTitle" :placement="placement">
<Dropdown ref="dropdown" @on-click="handleClick" :class="hideTitle ? '' : 'collased-menu-dropdown'" :transfer="hideTitle" :placement="placement">
<a class="drop-menu-a" type="text" @mouseover="handleMousemove($event, children)" :style="{textAlign: !hideTitle ? 'left' : ''}"><common-icon :size="rootIconSize" :color="textColor" :type="parentItem.icon"/><span class="menu-title" v-if="!hideTitle">{{ showTitle(parentItem) }}</span><Icon style="float: right;" v-if="!hideTitle" type="ios-arrow-forward" :size="16"/></a>
<DropdownMenu ref="dropdown" slot="list">
<template v-for="child in children">

View File

@ -45,9 +45,7 @@
.ivu-menu-submenu > .ivu-menu > .ivu-menu-item > i {
margin-right: 8px !important;
}
.ivu-select-dropdown.ivu-dropdown-transfer{
max-height: 1000px;
& div.ivu-dropdown{
.collased-menu-dropdown{
width: 100%;
margin: 0;
line-height: normal;
@ -64,5 +62,14 @@
& * {
color: #515a6e;
}
.ivu-menu-item > i{
margin-right: 12px !important;
}
.ivu-menu-submenu > .ivu-menu > .ivu-menu-item > i {
margin-right: 8px !important;
}
}
.ivu-select-dropdown.ivu-dropdown-transfer{
max-height: 400px;
}

View File

@ -136,12 +136,12 @@ export default {
},
watch: {
'$route' (newRoute) {
console.log(newRoute)
this.setBreadCrumb(newRoute.matched)
this.setTagNavList(getNewTagList(this.tagNavList, newRoute))
}
},
mounted () {
console.log(123123123131231)
/**
* @description 初始化设置面包屑导航和标签导航
*/