实现页面模板与用户管理页面基本功能

Signed-off-by: luorijun <luorijun@outlook.com>
This commit is contained in:
2025-12-29 18:01:16 +08:00
parent f950906f00
commit 37aaff439a
21 changed files with 1117 additions and 158 deletions

View File

@@ -0,0 +1,24 @@
"use client"
import { getPageUsers } from "@/actions/user"
import { DataTable, useDataTable } from "@/components/data-table"
import type { User } from "@/models/user"
export default function UserPage() {
const table = useDataTable<User>((page, size) => getPageUsers({ page, size }))
return (
<div>
<DataTable<User>
{...table}
columns={[
{ header: "ID", accessorKey: "id" },
{ header: "姓名", accessorKey: "name" },
{ header: "邮箱", accessorKey: "email" },
{ header: "角色", accessorKey: "role" },
{ header: "状态", accessorKey: "status" },
{ header: "创建时间", accessorKey: "createdAt" },
{ header: "更新时间", accessorKey: "updatedAt" },
]}
/>
</div>
)
}