diff --git a/src/core/icons.ts b/src/core/icons.ts index 91b440d4..fc321d2d 100644 --- a/src/core/icons.ts +++ b/src/core/icons.ts @@ -73,6 +73,10 @@ import IconExchange from "~icons/ri/exchange-line"; import IconGitHub from "~icons/ri/github-fill"; // @ts-ignore import IconUpload from "~icons/ri/upload-cloud-2-line"; +// @ts-ignore +import IconShieldUser from "~icons/ri/shield-user-line"; +// @ts-ignore +import IconGitBranch from "~icons/ri/git-branch-line"; export { IconDashboard, @@ -112,4 +116,6 @@ export { IconExchange, IconGitHub, IconUpload, + IconShieldUser, + IconGitBranch, }; diff --git a/src/router/routes.config.ts b/src/router/routes.config.ts index 8a020390..08cc92b9 100644 --- a/src/router/routes.config.ts +++ b/src/router/routes.config.ts @@ -24,6 +24,7 @@ import PluginList from "../views/system/plugins/PluginList.vue"; import PluginDetail from "../views/system/plugins/PluginDetail.vue"; import UserList from "../views/system/users/UserList.vue"; import RoleList from "../views/system/roles/RoleList.vue"; +import RoleDetail from "../views/system/roles/RoleDetail.vue"; import UserDetail from "../views/system/users/UserDetail.vue"; import ProfileModification from "../views/system/users/ProfileModification.vue"; import PasswordChange from "../views/system/users/PasswordChange.vue"; @@ -209,6 +210,11 @@ export const routes: Array = [ name: "Roles", component: RoleList, }, + { + path: "roles/:id", + name: "RoleDetail", + component: RoleDetail, + }, ], }, ], diff --git a/src/views/contents/posts/PostList.vue b/src/views/contents/posts/PostList.vue index 2a19d033..13460b54 100644 --- a/src/views/contents/posts/PostList.vue +++ b/src/views/contents/posts/PostList.vue @@ -14,6 +14,7 @@ import { IconArrowLeft, IconArrowRight, IconBookRead, + IconDeleteBin, IconSettings, } from "@/core/icons"; import { posts } from "./posts-mock"; @@ -308,12 +309,20 @@ const handleRouteToEditor = (post: any) => { @@ -345,6 +354,42 @@ const handleRouteToEditor = (post: any) => {
+ +
+ 状态 + + + +
+ +
diff --git a/src/views/system/roles/RoleDetail.vue b/src/views/system/roles/RoleDetail.vue new file mode 100644 index 00000000..180acc5b --- /dev/null +++ b/src/views/system/roles/RoleDetail.vue @@ -0,0 +1,159 @@ + + diff --git a/src/views/system/roles/RoleList.vue b/src/views/system/roles/RoleList.vue index 78c4df67..65a11e0a 100644 --- a/src/views/system/roles/RoleList.vue +++ b/src/views/system/roles/RoleList.vue @@ -1,2 +1,256 @@ - - + + diff --git a/src/views/system/roles/roles-mock.ts b/src/views/system/roles/roles-mock.ts new file mode 100644 index 00000000..c2606420 --- /dev/null +++ b/src/views/system/roles/roles-mock.ts @@ -0,0 +1,26 @@ +export const roles = [ + { + id: 1, + name: "Super Administrator", + permissions: 100, + users: 10, + }, + { + id: 2, + name: "Administrator", + permissions: 32, + users: 5, + }, + { + id: 3, + name: "Editor", + permissions: 10, + users: 3, + }, + { + id: 4, + name: "Guest", + permissions: 5, + users: 10232, + }, +]; diff --git a/src/views/system/users/UserDetail.vue b/src/views/system/users/UserDetail.vue index 72a49080..577ecdb2 100644 --- a/src/views/system/users/UserDetail.vue +++ b/src/views/system/users/UserDetail.vue @@ -2,8 +2,11 @@ import { VTag } from "@/components/base/tag"; import { IconUserSettings } from "@/core/icons"; import { inject } from "vue"; +import { useRouter } from "vue-router"; const user = inject("user"); + +const router = useRouter(); -
- 角色 - - - -
+ +
+ 角色 + + + +
+ +