This commit is contained in:
zhutianqi
2021-10-08 10:51:59 +08:00
parent fe2561c7ac
commit f05b214963
+59 -50
View File
@@ -9,58 +9,60 @@
</div>
</div>
<div class="toggle-btn iconfont" style="display: flex;justify-content: center; font-size: 30px; color: #333333;" @click="handleToggleSideBar"><div style="font-size: 14px; line-height: 30px;">{{ this.isCollapse ? '' : '' }}</div>&#xe647;</div>
<el-menu
unique-opened
:default-active="defaultActive"
background-color="#013483"
text-color="#000"
active-text-color="#ffd04b"
router
:collapse="isCollapse"
>
<template v-for="(item, index) in navMenuList">
<el-submenu
:key="index"
:index="item.path"
popper-class="nav-menu-popper"
v-if="!item.isChildren && (!item.menuId || $hasPermission(item.menuId))"
>
<template slot="title">
<i class="shangqi-icon" :class="item['icon-class']"></i>
<span>{{ item.title }}</span>
<el-badge is-dot class="has-no-read" v-if="item.title === '个人中心' && getDynamicTotal.allCount">
</el-badge>
</template>
<el-menu-item
v-for="(children, childrenIndex) in item.children"
:key="childrenIndex"
:index="children.path"
v-if="!children.menuId || $hasPermission(children.menuId)"itemSplitInfo
<div class="left-tree">
<el-menu
unique-opened
:default-active="defaultActive"
background-color="#013483"
text-color="#000"
active-text-color="#ffd04b"
router
:collapse="isCollapse"
>
<template v-for="(item, index) in navMenuList">
<el-submenu
:key="index"
:index="item.path"
popper-class="nav-menu-popper"
v-if="!item.isChildren && (!item.menuId || $hasPermission(item.menuId))"
>
<el-badge :value="getDynamicTotal.msgCount" class="item" v-if="children.title === '我的消息' && getDynamicTotal.msgCount !== 0">
{{ children.title }}
</el-badge>
<el-badge :value="getDynamicTotal.shareCount" class="item" v-else-if="children.title === '我的推送' && getDynamicTotal.shareCount !== 0">
{{ children.title }}
</el-badge>
<el-badge :value="getDynamicTotal.myStandCount" class="item" v-else-if="children.title === '我的企标' && getDynamicTotal.myStandCount !== 0">
{{ children.title }}
</el-badge>
<div v-else>
{{ children.title }}
</div>
<template slot="title">
<i class="shangqi-icon" :class="item['icon-class']"></i>
<span>{{ item.title }}</span>
<el-badge is-dot class="has-no-read" v-if="item.title === '个人中心' && getDynamicTotal.allCount">
</el-badge>
</template>
<el-menu-item
v-for="(children, childrenIndex) in item.children"
:key="childrenIndex"
:index="children.path"
v-if="!children.menuId || $hasPermission(children.menuId)"itemSplitInfo
>
<el-badge :value="getDynamicTotal.msgCount" class="item" v-if="children.title === '我的消息' && getDynamicTotal.msgCount !== 0">
{{ children.title }}
</el-badge>
<el-badge :value="getDynamicTotal.shareCount" class="item" v-else-if="children.title === '我的推送' && getDynamicTotal.shareCount !== 0">
{{ children.title }}
</el-badge>
<el-badge :value="getDynamicTotal.myStandCount" class="item" v-else-if="children.title === '我的企标' && getDynamicTotal.myStandCount !== 0">
{{ children.title }}
</el-badge>
<div v-else>
{{ children.title }}
</div>
</el-menu-item>
</el-submenu>
<el-menu-item
:key="index"
:index="item.path"
v-if="item.isChildren && (!item.menuId || $hasPermission(item.menuId))"
>
<i class="shangqi-icon" :class="item['icon-class']"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</el-submenu>
<el-menu-item
:key="index"
:index="item.path"
v-if="item.isChildren && (!item.menuId || $hasPermission(item.menuId))"
>
<i class="shangqi-icon" :class="item['icon-class']"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
</template>
</el-menu>
</template>
</el-menu>
</div>
</div>
</template>
<script>
@@ -487,6 +489,13 @@
box-sizing: border-box;
background: rgb(255, 255, 255);
background-size: 100% 100%;
.left-tree {
height: calc(~'100% - 95px');
overflow-y: auto;
}
.left-tree::-webkit-scrollbar {
display: none;
}
&:not(.is-collapse) {
width: 212px;
background: rgb(255, 255, 255);