zhangxiaoxu123456
2022-04-29 af63b044b26ddf2a381b28e7a7f413ddeb31e1e9
src/pages/components/showIndexTitle.vue
@@ -2,8 +2,7 @@
  <div class="showIndexTitle-wrap">
    <h1 class="title">石家庄人社局业务运行数据分析平台</h1>
    <el-menu
      :default-active="$route.path"
      :class="activeStyle"
      :default-active="activeIndex"
      router
      mode="horizontal"
      class="el-menu-demo"
@@ -74,21 +73,17 @@
<script>
export default {
  name: "showIndexTitle",
  watch: {
    '$route' (toRouter, fromRouter) {
        console.log(toRouter,'toRouter')
        console.log(fromRouter,'fromRouter')
        console.log('$route.path---',this.$route)
  data() {
    return {
        activeIndex: '/index'
    }
  },
    data() {
      return {
          activeStyle: false
      }
    },
  mounted() {
      this.$route.meta.routerParent && (this.activeIndex = '/' + this.$route.meta.routerParent)
  },
  methods: {
  }
  },
};
</script>