From 7c2ff43a4f70638fb063d0aa1d2f1624e6cada33 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期六, 07 五月 2022 15:25:42 +0800
Subject: [PATCH] 其他业务
---
src/pages/components/showIndexTitle.vue | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/src/pages/components/showIndexTitle.vue b/src/pages/components/showIndexTitle.vue
index 65a74d7..91c2402 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"
@@ -12,7 +11,6 @@
<el-menu-item index="/index">
<div class="showIndex-block">
<h1>棣栭〉</h1>
-
</div>
</el-menu-item>
<el-menu-item index="/jiuyeAndChuangye">
@@ -75,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>
--
Gitblit v1.9.1