From 543961e980d6b1d035a9d2ecebc28a78ec7832da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 15 Nov 2024 13:52:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- napcat.webui/src/components/Dashboard.vue | 13 +++++-- napcat.webui/src/components/webui/Nav.vue | 46 ++++++++++++++++++++--- napcat.webui/src/router/index.ts | 2 +- 3 files changed, 52 insertions(+), 9 deletions(-) diff --git a/napcat.webui/src/components/Dashboard.vue b/napcat.webui/src/components/Dashboard.vue index 4c71cbf2..ae567a49 100644 --- a/napcat.webui/src/components/Dashboard.vue +++ b/napcat.webui/src/components/Dashboard.vue @@ -18,9 +18,9 @@ export default { return { menuItems: [ { value: 'item1', icon: 'dashboard', label: '基础信息', route: '/dashboard/basic-info' }, - { value: 'item3', icon: 'play-circle', label: '网络配置', route: '/dashboard/network-config' }, - { value: 'item4', icon: 'play-circle', label: '其余配置', route: '/dashboard/other-config' }, - { value: 'item5', icon: 'edit-1', label: '日志查看', route: '/dashboard/log-view' }, + { value: 'item3', icon: 'wifi-1', label: '网络配置', route: '/dashboard/network-config' }, + { value: 'item4', icon: 'setting', label: '其余配置', route: '/dashboard/other-config' }, + { value: 'item5', icon: 'system-log', label: '日志查看', route: '/dashboard/log-view' }, { value: 'item6', icon: 'info-circle', label: '关于我们', route: '/dashboard/about-us' } ] }; @@ -33,4 +33,11 @@ export default { margin-left: 200px; /* 根据侧边栏宽度调整 */ padding: 20px; } + +@media (max-width: 768px) { + .content { + margin-left: 0; /* 移动端侧边栏收起 */ + padding: 10px; + } +} \ No newline at end of file diff --git a/napcat.webui/src/components/webui/Nav.vue b/napcat.webui/src/components/webui/Nav.vue index c21edea4..fe657589 100644 --- a/napcat.webui/src/components/webui/Nav.vue +++ b/napcat.webui/src/components/webui/Nav.vue @@ -1,7 +1,6 @@ \ No newline at end of file diff --git a/napcat.webui/src/router/index.ts b/napcat.webui/src/router/index.ts index 5d3173ca..93cbb4fa 100644 --- a/napcat.webui/src/router/index.ts +++ b/napcat.webui/src/router/index.ts @@ -7,6 +7,7 @@ import NetWork from '../pages/NetWork.vue'; import QQLogin from '../components/QQLogin.vue'; import WebUiLogin from '../components/WebUiLogin.vue'; import OtherConfig from '../pages/OtherConfig.vue'; + const routes = [ { path: '/', redirect: '/webui' }, { path: '/webui', component: WebUiLogin, name: 'WebUiLogin' }, @@ -14,7 +15,6 @@ const routes = [ { path: '/dashboard', component: Dashboard, - name: 'Dashboard', children: [ { path: '', redirect: 'basic-info' }, { path: 'basic-info', component: BasicInfo, name: 'BasicInfo' },