From 1d81702468678e5b2e46916a4369429fdb1d8b4b Mon Sep 17 00:00:00 2001 From: “dzb” <2632970487@qq.com> Date: 星期四, 03 十一月 2022 09:56:42 +0800 Subject: [PATCH] 新增页面导航区域 --- src/views/layout/components/Main/index.vue | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/views/layout/components/Main/index.vue b/src/views/layout/components/Main/index.vue index 0e738f8..7965864 100644 --- a/src/views/layout/components/Main/index.vue +++ b/src/views/layout/components/Main/index.vue @@ -2,7 +2,9 @@ <el-main> <!-- <NavBar /> --> <div class="content"> - <router-view></router-view> + <!-- 椤甸潰瀵艰埅鍖哄煙 --> + <div class="page-nav" v-if="navFlag"></div> + <router-view v-else></router-view> <!-- 搴曢儴鍖哄煙 --> <!-- <MyFooter/> --> </div> @@ -17,6 +19,16 @@ components: { // MyFooter, NavBar + }, + data() { + return { + navFlag:true + } + }, + watch:{ + '$route.path'(newPath,oldPath){ + newPath === '/home' ? this.navFlag = true : this.navFlag = false + } } }; </script> -- Gitblit v1.8.0