From 3b97d6ed1a423d735f762fe4b82d8cac552ea582 Mon Sep 17 00:00:00 2001 From: windfloat2019 Date: Tue, 21 Jun 2022 15:29:10 +0800 Subject: [PATCH] =?UTF-8?q?wzf=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 46 +++++++++++++-------- src/components/container/SideBar.vue | 19 ++++++--- src/components/container/Tags.vue | 34 ++++++++++++--- src/components/container/Top.vue | 13 ++++-- src/components/page/account/Login.vue | 2 + src/components/page/dashBoard/WorkBench.vue | 15 +++---- 6 files changed, 89 insertions(+), 40 deletions(-) diff --git a/src/App.vue b/src/App.vue index 5d5ed41..5cc29be 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,15 +1,16 @@ @@ -39,14 +49,14 @@ export default { margin: 0; padding: 0; } -#app{ +#app { display: flex; position: absolute; top: 0; bottom: 0; left: 0; right: 0; - .app_right{ + .app_right { flex: 1; } } diff --git a/src/components/container/SideBar.vue b/src/components/container/SideBar.vue index 35e9370..db84373 100644 --- a/src/components/container/SideBar.vue +++ b/src/components/container/SideBar.vue @@ -19,7 +19,7 @@ Dashboard - + 工作台 @@ -29,10 +29,10 @@ 系统管理 - + 账号管理 - + 菜单管理 @@ -45,10 +45,19 @@ import { Menu as IconMenu, Setting } from "@element-plus/icons-vue"; import { ref,onMounted } from "vue"; import mitt from '../../mitt' +import { useRouter } from 'vue-router'; export default { setup() { let isCollapse = ref(false); - + let router = useRouter() + function click(e,tagname){ + router.replace(e.index) + mitt.emit('navitem',{ + path:e.index, + tagname + }) + + } onMounted(()=>{ mitt.on('isfold',()=>{ isCollapse.value = !isCollapse.value @@ -57,7 +66,7 @@ export default { }) return { isCollapse, - + click }; }, components: { diff --git a/src/components/container/Tags.vue b/src/components/container/Tags.vue index c630434..d911438 100644 --- a/src/components/container/Tags.vue +++ b/src/components/container/Tags.vue @@ -1,22 +1,46 @@ // 顶部标签组件