Skip to content

Commit

Permalink
Todo: unset admin
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyCreeper committed Nov 16, 2023
1 parent a5dbc5a commit f0b754a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/apis/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const addAdminApi = useDefineApi<
method: "POST"
});

// TODO: 取消管理员身份

// 获取用户列表
export const userListApi = useDefineApi<
{
Expand Down
6 changes: 6 additions & 0 deletions src/views/admin/settings/UserManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ const setAdmin = async (id: string) => {
}
};
// 取消管理身份
const unsetAdmin = async (id: string) => {};
onMounted(async () => {
await getUserListApi();
});
Expand Down Expand Up @@ -170,6 +173,9 @@ onMounted(async () => {
@click="setAdmin(scope.row.id)"
>设为管理</el-dropdown-item
>
<el-dropdown-item v-else @click="unsetAdmin(scope.row.id)"
>取消管理身份</el-dropdown-item
>
</el-dropdown-menu>
</template>
</el-dropdown>
Expand Down

0 comments on commit f0b754a

Please sign in to comment.