|
|
@ -19,21 +19,6 @@
|
|
|
|
</el-menu-item>
|
|
|
|
</el-menu-item>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 顶部菜单超出数量折叠 -->
|
|
|
|
|
|
|
|
<!-- <el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
|
|
|
|
|
|
|
|
<template slot="title">更多菜单</template>
|
|
|
|
|
|
|
|
<template v-for="(item, index) in topMenus">
|
|
|
|
|
|
|
|
<el-menu-item
|
|
|
|
|
|
|
|
:index="item.path"
|
|
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
|
|
v-if="index >= visibleNumber">
|
|
|
|
|
|
|
|
<svg-icon
|
|
|
|
|
|
|
|
v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
|
|
|
|
|
|
|
|
:icon-class="item.meta.icon"/>
|
|
|
|
|
|
|
|
{{ item.meta.title }}
|
|
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-submenu> -->
|
|
|
|
|
|
|
|
</el-menu>
|
|
|
|
</el-menu>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -50,18 +35,18 @@ export default {
|
|
|
|
visibleNumber: 50,
|
|
|
|
visibleNumber: 50,
|
|
|
|
// 当前激活菜单的 index
|
|
|
|
// 当前激活菜单的 index
|
|
|
|
currentIndex: undefined,
|
|
|
|
currentIndex: undefined,
|
|
|
|
img1:require('../assets/images/menu (1).png'),
|
|
|
|
img1:require('../assets/images/icon/menu (6).png'),
|
|
|
|
img2:require('../assets/images/menu (2).png'),
|
|
|
|
img2:require('../assets/images/icon/menu (10).png'),
|
|
|
|
img3:require('../assets/images/menu (3).png'),
|
|
|
|
img3:require('../assets/images/icon/menu (2).png'),
|
|
|
|
img4:require('../assets/images/menu (4).png'),
|
|
|
|
img4:require('../assets/images/icon/menu (7).png'),
|
|
|
|
img5:require('../assets/images/menu (5).png'),
|
|
|
|
img5:require('../assets/images/xzzf.png'),
|
|
|
|
img6:require('../assets/images/menu (6).png'),
|
|
|
|
img6:require('../assets/images/icon/menu (8).png'),
|
|
|
|
img7:require('../assets/images/menu (6).png'),
|
|
|
|
img7:require('../assets/images/icon/menu (9).png'),
|
|
|
|
img8:require('../assets/images/menu (6).png'),
|
|
|
|
img8:require('../assets/images/icon/menu (1).png'),
|
|
|
|
img9:require('../assets/images/menu (6).png'),
|
|
|
|
img9:require('../assets/images/icon/menu (11).png'),
|
|
|
|
img10:require('../assets/images/menu (6).png'),
|
|
|
|
img10:require('../assets/images/icon/menu (5).png'),
|
|
|
|
img11:require('../assets/images/menu (6).png'),
|
|
|
|
img11:require('../assets/images/icon/menu (12).png'),
|
|
|
|
img12:require('../assets/images/menu (6).png'),
|
|
|
|
img12:require('../assets/images/icon/menu (4).png'),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
@ -133,21 +118,7 @@ export default {
|
|
|
|
return activePath;
|
|
|
|
return activePath;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// beforeMount() {
|
|
|
|
|
|
|
|
// window.addEventListener('resize', this.setVisibleNumber)
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// beforeDestroy() {
|
|
|
|
|
|
|
|
// window.removeEventListener('resize', this.setVisibleNumber)
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// mounted() {
|
|
|
|
|
|
|
|
// this.setVisibleNumber();
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 根据宽度计算设置显示栏数
|
|
|
|
|
|
|
|
// setVisibleNumber() {
|
|
|
|
|
|
|
|
// const width = document.body.getBoundingClientRect().width / 3;
|
|
|
|
|
|
|
|
// this.visibleNumber = parseInt(width / 85);
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// 菜单选择事件
|
|
|
|
// 菜单选择事件
|
|
|
|
handleSelect(key, keyPath) {
|
|
|
|
handleSelect(key, keyPath) {
|
|
|
|
this.currentIndex = key;
|
|
|
|
this.currentIndex = key;
|
|
|
|