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 | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/views/layout/components/Main/index.vue b/src/views/layout/components/Main/index.vue index a3453d7..7965864 100644 --- a/src/views/layout/components/Main/index.vue +++ b/src/views/layout/components/Main/index.vue @@ -1,15 +1,44 @@ <template> <el-main> - <router-view></router-view> + <!-- <NavBar /> --> + <div class="content"> + <!-- 椤甸潰瀵艰埅鍖哄煙 --> + <div class="page-nav" v-if="navFlag"></div> + <router-view v-else></router-view> + <!-- 搴曢儴鍖哄煙 --> + <!-- <MyFooter/> --> + </div> </el-main> </template> <script> +// import MyFooter from "../Footer" import NavBar from "../NavBar" export default { name: "Main", - components:{ + components: { + // MyFooter, NavBar + }, + data() { + return { + navFlag:true + } + }, + watch:{ + '$route.path'(newPath,oldPath){ + newPath === '/home' ? this.navFlag = true : this.navFlag = false + } } }; -</script> \ No newline at end of file +</script> +<style lang="scss"> +.el-main { + min-width: 1024px; + padding: 0; + .content { + padding: 11px; + height: 100%; + } +} +</style> -- Gitblit v1.8.0