diff --git a/components.d.ts b/components.d.ts
index d6c4598..67a3d3e 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -29,6 +29,7 @@ declare module 'vue' {
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
NModal: typeof import('naive-ui')['NModal']
NModalProvider: typeof import('naive-ui')['NModalProvider']
+ NPagination: typeof import('naive-ui')['NPagination']
NSplit: typeof import('naive-ui')['NSplit']
NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
@@ -39,5 +40,6 @@ declare module 'vue' {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
Tutorial: typeof import('./src/components/Tutorial.vue')['default']
+ UserActions: typeof import('./src/components/dashboard/UserActions.vue')['default']
}
}
diff --git a/src/api.ts b/src/api.ts
index 7056c58..afce8d5 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -51,12 +51,17 @@ export class Account {
return res.data
}
- static async list(query: { username: string }) {
+ static async list(query: { username: string; page: number }) {
const res = await http.get("/account/list", {
params: query,
})
return res.data
}
+
+ static async toggleActive(id: number) {
+ const res = await http.put(`/account/active/${id}`)
+ return res.data
+ }
}
export class Tutorial {
diff --git a/src/components/dashboard/UserActions.vue b/src/components/dashboard/UserActions.vue
new file mode 100644
index 0000000..d0fe924
--- /dev/null
+++ b/src/components/dashboard/UserActions.vue
@@ -0,0 +1,52 @@
+
+
+
+ 修改
+
+
+ 封号
+
+
+ 解封
+
+
+
+
diff --git a/src/pages/Dashboard.vue b/src/pages/Dashboard.vue
index b18ba59..a1413d4 100644
--- a/src/pages/Dashboard.vue
+++ b/src/pages/Dashboard.vue
@@ -25,7 +25,7 @@ const menu = [
label: "教程",
route: { name: "tutorial", params: { display: step.value } },
},
- { label: "用户", route: { name: "user-manage" } },
+ { label: "用户", route: { name: "user-manage", params: { page: 1 } } },
]