From 4e6d619762b2713c8c885b815e749a265d7fee5b Mon Sep 17 00:00:00 2001 From: lyc Date: Tue, 29 Oct 2024 15:06:02 +0800 Subject: [PATCH] 2.5init --- src/renderer/src/layout/components/Aside.vue | 45 ++++++++++++++------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue index 89772d0..820923a 100644 --- a/src/renderer/src/layout/components/Aside.vue +++ b/src/renderer/src/layout/components/Aside.vue @@ -2,13 +2,16 @@
- +
- 11 - 退出登录 +
    +
  • 个人中心
  • +
  • 班级中心
  • +
  • 退出登录
  • +
@@ -50,6 +53,8 @@ const router = useRouter() const currentRoute = ref('') const activeId = ref('/home') + + const headerMenus = [ { name: '教学大模型', @@ -57,21 +62,15 @@ const headerMenus = [ icon: 'icon-shouye', path: '/index' }, - { - name: '班级中心', - id: 2, - icon: 'icon-banji2', - path: '/class' - }, { name: '教学工作台', - id: 3, + id: 2, icon: 'icon-gongzuotai', path: '/home' }, { name: '资源中心', - id: 4, + id: 3, icon: 'icon-kechengziyuan1', path: '/resource' }, @@ -80,19 +79,23 @@ const headerMenus = [ const sideBottomMenu = [ { name: '设置', - id: 5, + id: 4, icon: 'icon-set', path: '/setting' }, - ] + const clickMenu = ({ id, disabled, path }) => { if (disabled) return activeId.value = id router.push(path) } +const onUserTo = (path) =>{ + router.push(path) +} + // 监听当前路由 watch( () => router.currentRoute.value, @@ -133,7 +136,8 @@ const logout = () => {