Commit f539bd62 authored by 纪泽龙's avatar 纪泽龙

修改路由跳转的两个小bug

parent 11dc01b0
......@@ -152,7 +152,7 @@ export default {
// 为了解决菜单样式bug问题
moreMenuChange() {
// 展示更多的前一个路由
const lastMenuPath = this.topMenus[this.visibleNumber - 1].path;
const lastMenuPath = this.topMenus[this.visibleNumber - 1]?.path;
// 当前跳转的路由
const routerMenuPath = this.$route.matched[0].path;
// 如果点击的正好是展示更多的前一个,展示更多就不能拥有高亮
......@@ -175,8 +175,10 @@ export default {
this.moreMenu = true;
},
removeEvt() {
this.$refs.noBg.$el.removeEventListener("mouseover", this.mouseOver);
this.$refs.noBg.$el.removeEventListener("mouseout", this.mouseOut);
if (this.$refs.noBg) {
this.$refs.noBg.$el.removeEventListener("mouseover", this.mouseOver);
this.$refs.noBg.$el.removeEventListener("mouseout", this.mouseOut);
}
},
// 根据宽度计算设置显示栏数
setVisibleNumber() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment