From 1d21c6b098b76c3fa28a39993c98c27d9972499b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=89=E6=9D=A5=E6=8A=80=E6=9C=AF?= <1490493387@qq.com> Date: Sun, 28 Nov 2021 22:49:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=8A=A8=E6=80=81=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/api/system/menu.ts | 2 +- src/layout/components/Navbar.vue | 2 +- src/layout/components/Settings/index.vue | 2 +- src/layout/components/Sidebar/Link.vue | 55 ++++----- src/layout/components/Sidebar/SidebarItem.vue | 114 ++++++++---------- src/layout/components/Sidebar/index.vue | 47 ++++---- src/layout/index.vue | 25 ++-- src/router/index.ts | 13 +- src/store/index.ts | 2 +- src/store/interface.ts | 5 +- src/store/modules/app.ts | 4 +- src/styles/variables.scss.d.ts | 9 ++ src/views/system/user/index.vue | 13 ++ vite.config.ts | 2 + 15 files changed, 146 insertions(+), 150 deletions(-) create mode 100644 src/styles/variables.scss.d.ts create mode 100644 src/views/system/user/index.vue diff --git a/package.json b/package.json index 8398b71..292aeca 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@types/node": "^16.11.7", "@types/nprogress": "^0.2.0", + "@types/path-browserify": "^1.0.0", "@vitejs/plugin-vue": "^1.9.3", "sass": "^1.43.4", "typescript": "^4.4.3", diff --git a/src/api/system/menu.ts b/src/api/system/menu.ts index e866ca1..5a506dc 100644 --- a/src/api/system/menu.ts +++ b/src/api/system/menu.ts @@ -2,7 +2,7 @@ import request from '@/utils/request' export function getRouteList() { return request({ - url: '/youlai-admin/api/v1/menus/route', + url: '/youlai-admin/api/v2/menus/route', method: 'get' }) } \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c5fa2f7..40bbc32 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -64,7 +64,7 @@ export default { return store.state.app.sidebar }) const device = computed(() => { - return store.state.app.device.toString() + return store.state.app.device }) const avatar = computed(() => { return store.state.user.avatar diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index dd2fa83..06c8856 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -52,7 +52,7 @@ export default defineComponent({ }) watch(() => state.sidebarLogo, (value) => { - store.dispatch('settings/changeSetting', { key: 'showSidebarLogo', value }) + store.dispatch('settings/changeSetting', { key: 'sidebarLogo', value }) }) return { diff --git a/src/layout/components/Sidebar/Link.vue b/src/layout/components/Sidebar/Link.vue index 530b3d5..8b76b87 100644 --- a/src/layout/components/Sidebar/Link.vue +++ b/src/layout/components/Sidebar/Link.vue @@ -1,43 +1,40 @@ - +}) + \ No newline at end of file diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 70c2f4c..4ebe832 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -1,47 +1,53 @@