diff --git a/src/App.vue b/src/App.vue index 81f2fc0..47ecfd1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -63,6 +63,12 @@ export default{ // 监听滚动事件 window.addEventListener('scroll', this.handleScroll); console.log(request,111) + for(var i in this.routerlist){ + if(this.$route.path==this.routerlist[i]){ + this.activeIndex=i + } + + } }, beforeDestroy() { // 组件销毁前移除滚动事件监听 diff --git a/src/views/project.vue b/src/views/project.vue index 644f967..9745b5c 100644 --- a/src/views/project.vue +++ b/src/views/project.vue @@ -30,6 +30,9 @@ +