From 295f2424efb649bdf5946ff8e49f89a67ad9469a Mon Sep 17 00:00:00 2001 From: SuperCuteXiaoSi <1531733886@qq.com> Date: Sun, 19 Jun 2022 16:46:15 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=B7=BB=E5=8A=A0=E6=B7=B7=E5=90=88?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 + package.json | 1 + src/hooks/userAppWindow.ts | 3 +- .../pageLayouts/components/AppMain/index.vue | 4 +- .../components/Breadcrumb/index.vue | 37 +++---- .../pageLayouts/components/Navbart/index.vue | 58 +++------- .../pageLayouts/components/Seting/index.vue | 59 ++++++++--- .../components/Sidebar/MinSidebar.vue | 38 +++++++ .../components/Sidebar/SidebarItem.vue | 5 +- .../pageLayouts/components/Sidebar/index.vue | 100 ++++++++++-------- .../components/VerticalSidebar/index.vue | 38 +++++++ src/layouts/pageLayouts/index.vue | 24 ++--- src/router/modules/otherRoute/otherRoute.ts | 10 +- src/router/utils.ts | 45 ++++++++ src/store/types.ts | 4 +- src/styles/el-theme.scss | 5 +- src/styles/sidebar.scss | 34 ++++-- .../components/seamless-scroll/index.vue | 8 +- types/route.d.ts | 3 +- 19 files changed, 315 insertions(+), 164 deletions(-) create mode 100644 src/layouts/pageLayouts/components/Sidebar/MinSidebar.vue create mode 100644 src/layouts/pageLayouts/components/VerticalSidebar/index.vue diff --git a/index.html b/index.html index af5e271c..633c23f4 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,9 @@ + diff --git a/package.json b/package.json index d1c3bcab..4b126c36 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "http-server": "^14.1.1", "husky": "^8.0.1", "lint-staged": "^13.0.1", + "path": "^0.12.7", "postcss-html": "^1.4.1", "postcss-import": "^14.1.0", "prettier": "2.6.2", diff --git a/src/hooks/userAppWindow.ts b/src/hooks/userAppWindow.ts index 0d63c2c5..469f3eb9 100644 --- a/src/hooks/userAppWindow.ts +++ b/src/hooks/userAppWindow.ts @@ -1,10 +1,11 @@ // import { useStore } from '@/store' import { computed } from 'vue'; import { useAppStore } from '@/store/modules/app'; +import { appConfig } from '@/store/types'; export const getAppCollapseMenu = () => { // const store = useStore() const appStore = useAppStore(); - const appConfigMode = computed(() => appStore.getAppConfigMode); + const appConfigMode = computed(() => appStore.getAppConfigMode); return { appConfigMode }; }; diff --git a/src/layouts/pageLayouts/components/AppMain/index.vue b/src/layouts/pageLayouts/components/AppMain/index.vue index 3df51a86..8e91da09 100644 --- a/src/layouts/pageLayouts/components/AppMain/index.vue +++ b/src/layouts/pageLayouts/components/AppMain/index.vue @@ -22,8 +22,8 @@ .app-main { position: relative; width: 100%; - height: calc(100vh - #{$navBarHeight+$BreadcrumbHeight}); - // min-height: calc(100vh - #{$navBarHeight+$BreadcrumbHeight}); + height: calc(100vh - #{$navBarHeight+$TabsPageHeight}); + // min-height: calc(100vh - #{$navBarHeight+$TabsPageHeight}); overflow: auto; padding: 20px; background-color: #{$app-main-bg-color}; diff --git a/src/layouts/pageLayouts/components/Breadcrumb/index.vue b/src/layouts/pageLayouts/components/Breadcrumb/index.vue index 49ce0527..2ac28e82 100644 --- a/src/layouts/pageLayouts/components/Breadcrumb/index.vue +++ b/src/layouts/pageLayouts/components/Breadcrumb/index.vue @@ -1,10 +1,5 @@ @@ -103,10 +104,6 @@ } .app-breadcrumb.el-breadcrumb { - // display: inline-block; - // font-size: 14px; - line-height: #{$BreadcrumbHeight}; - // margin-left: 8px; .redirect { color: $BreadcrumbText; } diff --git a/src/layouts/pageLayouts/components/Navbart/index.vue b/src/layouts/pageLayouts/components/Navbart/index.vue index abe23b46..507c9a61 100644 --- a/src/layouts/pageLayouts/components/Navbart/index.vue +++ b/src/layouts/pageLayouts/components/Navbart/index.vue @@ -1,7 +1,11 @@ + diff --git a/src/layouts/pageLayouts/components/VerticalSidebar/index.vue b/src/layouts/pageLayouts/components/VerticalSidebar/index.vue new file mode 100644 index 00000000..1b471b76 --- /dev/null +++ b/src/layouts/pageLayouts/components/VerticalSidebar/index.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/layouts/pageLayouts/index.vue b/src/layouts/pageLayouts/index.vue index 6adb5b3d..46845a4d 100644 --- a/src/layouts/pageLayouts/index.vue +++ b/src/layouts/pageLayouts/index.vue @@ -1,19 +1,13 @@