diff --git a/README.md b/README.md index 75a58dc..61698ec 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,14 @@ China repository: [Gitee](https://gitee.com/un-pany/v3-admin-vite) ## Functions -- **User management**: log in, log out of the demo -- **Authority management**: Built-in page permissions (dynamic routing), instruction permissions, permission functions +- **User management**: Log in and out of the demo +- **Authority management**: Page-level permissions (dynamic routing), button-level permissions (directive permissions, permission functions), and route navigation guards - **Multiple Environments**: Development, Staging, Production -- **Multiple themes**: Normal, Dark, Dark Blue, theme modes -- **Multiple layouts**:Built-in left, top, left-top three layout modes +- **Multiple themes**: Normal, Dark, Dark Blue, three theme modes +- **Multiple layouts**:Left, Top, Left Top, three layout modes - **Error page**: 403, 404 - **Dashboard**: Display different Dashboard pages according to different users -- **Other functions**:SVG, Dynamic Sidebar, Dynamic Breadcrumb Navigation, Tabbed Navigation, Screenfull, Adaptive Shrink Sidebar, HooK (Composables) +- **Other functions**:SVG, Dynamic Sidebar, Dynamic Breadcrumb Navigation, Tabbed Navigation, Screenfull, Adaptive Shrink Sidebar, Hook (Composables) ## 🚀 Development diff --git a/README.zh-CN.md b/README.zh-CN.md index f37d60b..85c533d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -52,10 +52,10 @@ V3 Admin Vite 是一个免费开源的中后台管理系统基础解决方案, ## 功能 - **用户管理**:登录、登出演示 -- **权限管理**:内置页面权限(动态路由)、指令权限、权限函数、路由守卫 +- **权限管理**:页面级权限(动态路由)、按钮级权限(指令权限、权限函数)、路由守卫 - **多环境**:开发环境(development)、预发布环境(staging)、正式环境(production) -- **多主题**:内置普通、黑暗、深蓝三种主题模式 -- **多布局**:内置左侧、顶部、混合三种布局模式 +- **多主题**:普通、黑暗、深蓝, 三种主题模式 +- **多布局**:左侧、顶部、混合, 三种布局模式 - **错误页面**: 403、404 - **Dashboard**:根据不同用户显示不同的 Dashboard 页面 - **其他内置功能**:SVG、动态侧边栏、动态面包屑、标签页快捷导航、Screenfull 全屏、自适应收缩侧边栏、Hook(Composables) diff --git a/src/router/index.ts b/src/router/index.ts index fbfc2f1..c35bb4b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -217,7 +217,7 @@ export const constantRoutes: RouteRecordRaw[] = [ redirect: "/hook-demo/use-fetch-select", name: "HookDemo", meta: { - title: "Hook 示例", + title: "Hook", elIcon: "Menu", alwaysShow: true }, @@ -262,7 +262,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ redirect: "/permission/page", name: "Permission", meta: { - title: "权限管理", + title: "权限", svgIcon: "lock", roles: ["admin", "editor"], // 可以在根路由中设置角色 alwaysShow: true // 将始终显示根菜单 @@ -273,7 +273,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ component: () => import("@/views/permission/page.vue"), name: "PagePermission", meta: { - title: "页面权限", + title: "页面级", roles: ["admin"] // 或者在子导航中设置角色 } }, @@ -282,7 +282,7 @@ export const dynamicRoutes: RouteRecordRaw[] = [ component: () => import("@/views/permission/directive.vue"), name: "DirectivePermission", meta: { - title: "指令权限" // 如果未设置角色,则表示:该页面不需要权限,但会继承根路由的角色 + title: "按钮级" // 如果未设置角色,则表示:该页面不需要权限,但会继承根路由的角色 } } ] diff --git a/src/router/permission.ts b/src/router/permission.ts index 0ef6c7c..c5bcee5 100644 --- a/src/router/permission.ts +++ b/src/router/permission.ts @@ -19,7 +19,7 @@ router.beforeEach(async (to, _from, next) => { const permissionStore = usePermissionStoreHook() const token = getToken() - // 判断该用户是否已经登录 + // 如果没有登陆 if (!token) { // 如果在免登录的白名单中,则直接进入 if (isWhiteList(to)) return next() diff --git a/src/views/dashboard/components/Admin.vue b/src/views/dashboard/components/Admin.vue index 7964172..ee36c60 100644 --- a/src/views/dashboard/components/Admin.vue +++ b/src/views/dashboard/components/Admin.vue @@ -1,6 +1,6 @@ diff --git a/src/views/dashboard/components/Editor.vue b/src/views/dashboard/components/Editor.vue index 2f369d6..482ddd0 100644 --- a/src/views/dashboard/components/Editor.vue +++ b/src/views/dashboard/components/Editor.vue @@ -1,6 +1,6 @@ diff --git a/src/views/permission/components/SwitchRoles.vue b/src/views/permission/components/SwitchRoles.vue index dc48832..59d5f9a 100644 --- a/src/views/permission/components/SwitchRoles.vue +++ b/src/views/permission/components/SwitchRoles.vue @@ -11,12 +11,12 @@ watch(switchRoles, (value) => {