From 3f9d6373124679234f5b96d784705474d016544e Mon Sep 17 00:00:00 2001
From: zhangxiaoxu123456 <zxx19900626>
Date: 星期日, 24 四月 2022 14:24:52 +0800
Subject: [PATCH] 人事人才细节

---
 src/pages/components/showIndexTitle.vue |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/src/pages/components/showIndexTitle.vue b/src/pages/components/showIndexTitle.vue
index 1eeac87..3b0b3a1 100644
--- a/src/pages/components/showIndexTitle.vue
+++ b/src/pages/components/showIndexTitle.vue
@@ -2,8 +2,7 @@
   <div class="showIndexTitle-wrap">
     <h1 class="title">鐭冲搴勪汉绀惧眬涓氬姟杩愯鏁版嵁鍒嗘瀽骞冲彴</h1>
     <el-menu
-      default-active="/index"
-      :class="activeStyle"
+      :default-active="activeIndex"
       router
       mode="horizontal"
       class="el-menu-demo"
@@ -74,21 +73,18 @@
 <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 {
+        activeStyle: false,
+        activeIndex: '/index'
     }
   },
-    data() {
-      return {
-          activeStyle: false
-      }
-    },
+  mounted() {
+      this.$route.meta.routerParent && (this.activeIndex = '/' + this.$route.meta.routerParent)
+  },
   methods: {
 
-  }
+  },
 };
 </script>
 

--
Gitblit v1.9.1