From 82e9624179ff2f4d3bd6af0083e7acc7cbba16d6 Mon Sep 17 00:00:00 2001 From: fangyunong Date: Tue, 8 Jul 2025 22:12:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E5=8A=A8=E7=94=BB=E5=AF=BC=E8=87=B4=E7=99=BD?= =?UTF-8?q?=E5=B1=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.ts | 31 +++++++++-------------- src/views/layout/components/LayoutNav.vue | 25 ++++-------------- src/views/layout/index.vue | 8 +++--- 3 files changed, 22 insertions(+), 42 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 5062e49..70ab569 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,10 +7,9 @@ import Layout from "@/views/layout/index.vue"; //首页布局 import CallBack from "@/views/login/OauthCallBack.vue"; //反馈页面 import Home from "@/views/home/index.vue"; //家 import Auth from "@/views/role/pages/Auth.vue"; //权限管理 -import Menu from '@/views/system/menu/index.vue'; //动态权限菜单 -import Register from '@/views/login/Register.vue'; //用户注册 -import Dict from '@/views/system/dict/index.vue'; //用户字典 -import GlobalSys from '@/views/system/globalSys/index.vue'; //全局参数 +import Menu from "@/views/system/menu/index.vue"; //动态权限菜单 +import Dict from "@/views/system/dict/index.vue"; //用户字典 +import GlobalSys from "@/views/system/globalSys/index.vue"; //全局参数 import { getToken } from "@/utils/auth"; const whiteList = ["/callback"]; @@ -26,24 +25,18 @@ const routes: Array = [ name: "CallBack", component: CallBack, }, - { - path:'/register', - name:'register', - component:Register - }, { path: "/layout", name: "Layout", component: Layout, children: [ { - path: "", + path: "", // 匹配 /layout name: "home", component: Home, }, - // 后续用动态菜单 { - path: "role", + path: "role", // 匹配 /layout/role name: "roleAuth", component: Auth, }, @@ -53,15 +46,15 @@ const routes: Array = [ component: Menu, }, { - path:'dict', - name:'dict', - component:Dict + path: "dict", + name: "dict", + component: Dict, }, { - path:'globalSys', - name:'globalSys', - component:GlobalSys - } + path: "globalSys", + name: "globalSys", + component: GlobalSys, + }, ], }, ]; diff --git a/src/views/layout/components/LayoutNav.vue b/src/views/layout/components/LayoutNav.vue index c833692..ff99cbe 100644 --- a/src/views/layout/components/LayoutNav.vue +++ b/src/views/layout/components/LayoutNav.vue @@ -39,10 +39,7 @@ const menuOptions: MenuOption[] = [ RouterLink, { to: { - name: 'home', - params: { - lang: 'zh-CN' - } + name: 'home' } }, { default: () => '概览' } @@ -60,10 +57,7 @@ const menuOptions: MenuOption[] = [ RouterLink, { to: { - name: 'roleAuth', - params: { - lang: 'zh-CN' - } + name: 'roleAuth' } }, { default: () => '权限分配' } @@ -83,10 +77,7 @@ const menuOptions: MenuOption[] = [ RouterLink, { to: { - name: 'menu', - params: { - lang: 'zh-CN' - } + name: 'menu' } }, { default: () => '菜单管理' } @@ -99,10 +90,7 @@ const menuOptions: MenuOption[] = [ RouterLink, { to: { - name: 'dict', - params: { - lang: 'zh-CN' - } + name: 'dict' } }, { default: () => '字典配置' } @@ -115,10 +103,7 @@ const menuOptions: MenuOption[] = [ RouterLink, { to: { - name: 'globalSys', - params: { - lang: 'zh-CN' - } + name: 'globalSys' } }, { default: () => '全局参数' } diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index c96cd22..b692350 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -6,7 +6,9 @@ - +
+ +
@@ -29,11 +31,11 @@ import LayoutNav from './components/LayoutNav.vue'; } .slide-fade-enter-active { - transition: all 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55); + transition: all 0.47s cubic-bezier(0.68, -0.55, 0.27, 1.55); } .slide-fade-leave-active { - transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); + transition: all 0.47s cubic-bezier(0.68, -0.55, 0.27, 1.55); } .slide-fade-enter-from {