From c5180c0dfe1bb663eb754212bb83d35a66b1a178 Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Thu, 30 Nov 2023 23:01:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/sidebar.scss | 4 + src/layout/components/Sidebar/index.vue | 7 +- src/layoutMain/components/AppMain.vue | 68 ++ .../components/IframeToggle/index.vue | 27 + src/layoutMain/components/InnerLink/index.vue | 24 + src/layoutMain/components/Navbar.vue | 188 +++ src/layoutMain/components/Settings/index.vue | 241 ++++ src/layoutMain/components/Sidebar/Link.vue | 40 + src/layoutMain/components/Sidebar/Logo.vue | 81 ++ .../components/Sidebar/SidebarItem.vue | 102 ++ src/layoutMain/components/Sidebar/index.vue | 54 + .../components/TagsView/ScrollPane.vue | 105 ++ src/layoutMain/components/TagsView/index.vue | 338 ++++++ src/layoutMain/components/index.js | 4 + src/layoutMain/index.vue | 108 ++ src/router/index.js | 3 +- src/views/index.vue | 1037 +---------------- 17 files changed, 1426 insertions(+), 1005 deletions(-) create mode 100644 src/layoutMain/components/AppMain.vue create mode 100644 src/layoutMain/components/IframeToggle/index.vue create mode 100644 src/layoutMain/components/InnerLink/index.vue create mode 100644 src/layoutMain/components/Navbar.vue create mode 100644 src/layoutMain/components/Settings/index.vue create mode 100644 src/layoutMain/components/Sidebar/Link.vue create mode 100644 src/layoutMain/components/Sidebar/Logo.vue create mode 100644 src/layoutMain/components/Sidebar/SidebarItem.vue create mode 100644 src/layoutMain/components/Sidebar/index.vue create mode 100644 src/layoutMain/components/TagsView/ScrollPane.vue create mode 100644 src/layoutMain/components/TagsView/index.vue create mode 100644 src/layoutMain/components/index.js create mode 100644 src/layoutMain/index.vue diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 8b3c472..7c982fa 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -115,10 +115,14 @@ .sidebar-container { width: 54px !important; } + .main-container { margin-left: 54px; } + .layMain-container { + margin-left: 0 !important; + } .sub-menu-title-noDropdown { padding: 0 !important; diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 9b14dfc..ad35581 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -36,7 +36,12 @@ const appStore = useAppStore() const settingsStore = useSettingsStore() const permissionStore = usePermissionStore() -const sidebarRouters = computed(() => permissionStore.sidebarRouters); +const sidebarRouters = computed(() => permissionStore.sidebarRouters.filter((item) => { + return item.path === localStorage.getItem('CURRENT_MENU'); +})); +// const sidebarRouters = computed(() => permissionStore.sidebarRouters.filter((item) => { +// return item.path === localStorage.getItem('CURRENT_MENU') +// })); const showLogo = computed(() => settingsStore.sidebarLogo); const sideTheme = computed(() => settingsStore.sideTheme); const theme = computed(() => settingsStore.theme); diff --git a/src/layoutMain/components/AppMain.vue b/src/layoutMain/components/AppMain.vue new file mode 100644 index 0000000..42fffdf --- /dev/null +++ b/src/layoutMain/components/AppMain.vue @@ -0,0 +1,68 @@ + + + + + + + + diff --git a/src/layoutMain/components/IframeToggle/index.vue b/src/layoutMain/components/IframeToggle/index.vue new file mode 100644 index 0000000..2b8269b --- /dev/null +++ b/src/layoutMain/components/IframeToggle/index.vue @@ -0,0 +1,27 @@ + + + diff --git a/src/layoutMain/components/InnerLink/index.vue b/src/layoutMain/components/InnerLink/index.vue new file mode 100644 index 0000000..53a903c --- /dev/null +++ b/src/layoutMain/components/InnerLink/index.vue @@ -0,0 +1,24 @@ + + + diff --git a/src/layoutMain/components/Navbar.vue b/src/layoutMain/components/Navbar.vue new file mode 100644 index 0000000..8dc70b7 --- /dev/null +++ b/src/layoutMain/components/Navbar.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/src/layoutMain/components/Settings/index.vue b/src/layoutMain/components/Settings/index.vue new file mode 100644 index 0000000..3360959 --- /dev/null +++ b/src/layoutMain/components/Settings/index.vue @@ -0,0 +1,241 @@ + + + + + \ No newline at end of file diff --git a/src/layoutMain/components/Sidebar/Link.vue b/src/layoutMain/components/Sidebar/Link.vue new file mode 100644 index 0000000..8011431 --- /dev/null +++ b/src/layoutMain/components/Sidebar/Link.vue @@ -0,0 +1,40 @@ + + + diff --git a/src/layoutMain/components/Sidebar/Logo.vue b/src/layoutMain/components/Sidebar/Logo.vue new file mode 100644 index 0000000..67582d0 --- /dev/null +++ b/src/layoutMain/components/Sidebar/Logo.vue @@ -0,0 +1,81 @@ + + + + + \ No newline at end of file diff --git a/src/layoutMain/components/Sidebar/SidebarItem.vue b/src/layoutMain/components/Sidebar/SidebarItem.vue new file mode 100644 index 0000000..7adac23 --- /dev/null +++ b/src/layoutMain/components/Sidebar/SidebarItem.vue @@ -0,0 +1,102 @@ + + + diff --git a/src/layoutMain/components/Sidebar/index.vue b/src/layoutMain/components/Sidebar/index.vue new file mode 100644 index 0000000..9b14dfc --- /dev/null +++ b/src/layoutMain/components/Sidebar/index.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/layoutMain/components/TagsView/ScrollPane.vue b/src/layoutMain/components/TagsView/ScrollPane.vue new file mode 100644 index 0000000..516b5d2 --- /dev/null +++ b/src/layoutMain/components/TagsView/ScrollPane.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/src/layoutMain/components/TagsView/index.vue b/src/layoutMain/components/TagsView/index.vue new file mode 100644 index 0000000..c1b7e3f --- /dev/null +++ b/src/layoutMain/components/TagsView/index.vue @@ -0,0 +1,338 @@ + + + + + + + \ No newline at end of file diff --git a/src/layoutMain/components/index.js b/src/layoutMain/components/index.js new file mode 100644 index 0000000..fd57731 --- /dev/null +++ b/src/layoutMain/components/index.js @@ -0,0 +1,4 @@ +export { default as AppMain } from './AppMain' +export { default as Navbar } from './Navbar' +export { default as Settings } from './Settings' +export { default as TagsView } from './TagsView/index.vue' diff --git a/src/layoutMain/index.vue b/src/layoutMain/index.vue new file mode 100644 index 0000000..98e43da --- /dev/null +++ b/src/layoutMain/index.vue @@ -0,0 +1,108 @@ + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index d0b8355..25c4ec5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,6 +4,7 @@ import { } from 'vue-router' /* Layout */ import Layout from '@/layout' +import LayoutMain from '@/layoutMain' /** * Note: 路由配置项 @@ -59,7 +60,7 @@ export const constantRoutes = [{ }, { path: '', - component: Layout, + component: LayoutMain, redirect: '/index', children: [{ path: '/index', diff --git a/src/views/index.vue b/src/views/index.vue index cf2e8dd..3991721 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,1016 +1,47 @@