import { api } from '@/lib/api' import { usePaged } from '@/lib/usePaged' import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Card, CardContent } from '@/components/ui/card' import { Pager } from '@/components/Pager' export default function Comments() { const { page, setPage, data, totalPages, reload } = usePaged(api.comments) async function del(id: number) { await api.deleteComment(id) reload() } return (

评论管理

ID 帖子ID 作者 内容 状态 操作 {data?.list?.map((c) => ( {c.id} {c.post_id} {c.author_name} {c.content} {c.status === 'deleted' ? 已删除 : 正常} {c.status !== 'deleted' && ( )} ))}
) }