本次提交完成了以下核心变更: 1. 新增完整的频道管理模块,包括频道增删改查API、页面组件与权限配置 2. 为短剧功能添加频道关联字段,支持将短剧绑定到指定频道 3. 全局UI优化:统一使用Panel组件重构页面布局,统一样式规范与交互细节 4. 表格与日志组件优化:新增请求方法颜色标记、耗时高亮、状态码分级展示 5. 登录页、个人中心、布局等页面的视觉升级与交互优化 6. 完善全局TailwindCSS样式与组件样式自定义
22 lines
1.1 KiB
TypeScript
22 lines
1.1 KiB
TypeScript
import { Table, Tag } from "@arco-design/web-react";
|
|
import type { RequestLogTableProps } from "./interface";
|
|
|
|
export function RequestLogTable({ data, loading }: RequestLogTableProps) {
|
|
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 color={value === 'GET' ? 'blue' : value === 'POST' ? 'green' : 'orange'}>{value}</Tag> },
|
|
{ title: "路径", dataIndex: "path", ellipsis: true },
|
|
{ title: "状态", dataIndex: "statusCode", width: 100, render: (value) => <Tag color={value < 400 ? "green" : value < 500 ? "orange" : "red"}>{value}</Tag> },
|
|
{ title: "耗时", dataIndex: "costMs", width: 100, render: (value) => <span className={Number(value) > 1000 ? 'text-danger font-medium' : ''}>{value}ms</span> },
|
|
{ title: "消息", dataIndex: "message", width: 180 },
|
|
]}
|
|
/>
|
|
);
|
|
}
|