Files
cyh-tk-admin/src/components/RequestLogTable.tsx
zhxiao1124 51e26025c6 feat: 完成TikTok短剧管理后台基础功能开发
本次提交搭建了完整的后台管理系统,包含:
1.  登录认证与权限校验体系
2.  工作台、短剧、用户、角色、人员、日志等全业务模块
3.  响应式布局与通用样式组件
4.  菜单动态过滤与路由权限控制
5.  移除了README中冗余的权限管理菜单项
2026-07-01 15:24:13 +08:00

16 lines
849 B
TypeScript

import { Table, Tag } from '@arco-design/web-react';
import type { RequestLog } from '../api/types';
export function RequestLogTable({ data, loading }: { data: RequestLog[]; loading: boolean }) {
return (
<Table rowKey="requestId" loading={loading} data={data} pagination={false} columns={[
{ title: '请求 ID', dataIndex: 'requestId', ellipsis: true },
{ title: '方法', dataIndex: 'method', width: 100, render: (value) => <Tag>{value}</Tag> },
{ title: '路径', dataIndex: 'path', ellipsis: true },
{ title: '状态', dataIndex: 'statusCode', width: 100, render: (value) => <Tag color={value < 400 ? 'green' : 'red'}>{value}</Tag> },
{ title: '耗时', dataIndex: 'costMs', width: 100, render: (value) => String(value) + 'ms' },
{ title: '消息', dataIndex: 'message', width: 180 },
]} />
);
}