From 4150e939a955612218be03d60674b94bf4f6144c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E4=B8=83=E5=B9=B4=E5=A4=8F?= <2098833867@qq.com> Date: Tue, 28 Feb 2023 16:41:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B6=E7=AB=AF=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F=EF=BC=8C=E7=8E=B0?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=B7=A6=E4=B8=AD=E5=8F=B3=E5=88=86=E5=8C=BA?= =?UTF-8?q?NavBar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 22 --- src/components/AppPage.vue | 82 ++++++++++ src/layout/app-main/Hamburger.vue | 4 +- src/layout/app-main/Navbar.vue | 207 ++++++++++++++---------- src/store/basic.ts | 8 +- src/views/menuManagement/index.vue | 15 +- src/views/roleManagement/index.vue | 246 +++++++++++++++-------------- typings/components.d.ts | 2 + 8 files changed, 344 insertions(+), 242 deletions(-) create mode 100644 src/components/AppPage.vue diff --git a/index.html b/index.html index 0dec1a7..ad74099 100644 --- a/index.html +++ b/index.html @@ -5,31 +5,9 @@ <%= title %> -
-
-
-
-
diff --git a/src/components/AppPage.vue b/src/components/AppPage.vue new file mode 100644 index 0000000..693b2c3 --- /dev/null +++ b/src/components/AppPage.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/layout/app-main/Hamburger.vue b/src/layout/app-main/Hamburger.vue index aa6b6ca..991f0f4 100644 --- a/src/layout/app-main/Hamburger.vue +++ b/src/layout/app-main/Hamburger.vue @@ -12,10 +12,10 @@ defineProps({ default: false } }) -const emit = defineEmits(['toggleClick']) +const emit = defineEmits(['toggle-click']) //切换左侧栏关闭和隐藏 const toggleClick = () => { - emit('toggleClick') + emit('toggle-click') } diff --git a/src/layout/app-main/Navbar.vue b/src/layout/app-main/Navbar.vue index f5d1e65..bd31776 100644 --- a/src/layout/app-main/Navbar.vue +++ b/src/layout/app-main/Navbar.vue @@ -1,131 +1,164 @@ diff --git a/src/store/basic.ts b/src/store/basic.ts index d673308..a598af7 100644 --- a/src/store/basic.ts +++ b/src/store/basic.ts @@ -1,3 +1,4 @@ +import type { VNode } from 'vue' import { nextTick } from 'vue' import { defineStore } from 'pinia' import type { RouterTypes } from '~/basic' @@ -22,7 +23,12 @@ export const useBasicStore = defineStore('basic', { sidebar: { opened: true }, //axios req collection axiosPromiseArr: [] as Array, - settings: defaultSettings + settings: defaultSettings, + navbar: { + left: [] as VNode[], + right: [] as VNode[], + center: [] as VNode[] + } } }, persist: { diff --git a/src/views/menuManagement/index.vue b/src/views/menuManagement/index.vue index e436e83..39fa0ca 100644 --- a/src/views/menuManagement/index.vue +++ b/src/views/menuManagement/index.vue @@ -1,5 +1,5 @@