feat: 完成TikTok短剧管理后台基础功能开发
本次提交搭建了完整的后台管理系统,包含: 1. 登录认证与权限校验体系 2. 工作台、短剧、用户、角色、人员、日志等全业务模块 3. 响应式布局与通用样式组件 4. 菜单动态过滤与路由权限控制 5. 移除了README中冗余的权限管理菜单项
This commit is contained in:
15
src/components/RequestLogTable.tsx
Normal file
15
src/components/RequestLogTable.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
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 },
|
||||
]} />
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user