vue 导航保持高亮

/**
       * 页面刷新导航保持高亮
      */
      menuList() {
        let path = this.$route.matched[2].path
        this.navList.forEach((e, i) => {
          if (path.indexOf(e.query.path) != -1) {
            this.navIndex = i
          }
        })
      },

  

posted @ 2020-03-19 15:51  AlanTao  阅读(653)  评论(0编辑  收藏  举报