chore: added some buttons
This commit is contained in:
parent
322917982e
commit
ca50230731
@ -1,7 +1,7 @@
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
import { ProColumns, ProTable } from "@ant-design/pro-components";
|
import { ProColumns, ProTable } from "@ant-design/pro-components";
|
||||||
import { Button, Space } from "antd";
|
import { Button, Space, Tag } from "antd";
|
||||||
|
|
||||||
import { StatusApi } from "../api/status.ts";
|
import { StatusApi } from "../api/status.ts";
|
||||||
|
|
||||||
@ -35,6 +35,10 @@ const columns: ProColumns<SubmissionInfo>[] = [
|
|||||||
title: "Point",
|
title: "Point",
|
||||||
dataIndex: "point",
|
dataIndex: "point",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
render: (_node, entity) => {
|
||||||
|
const color = entity.point === "Pending" ? "purple" : entity.point === "100" ? "green" : "red";
|
||||||
|
return <Tag color={color}>{entity.point}</Tag>;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Date",
|
title: "Date",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
import { ProColumns, ProTable } from "@ant-design/pro-components";
|
import { ProColumns, ProTable } from "@ant-design/pro-components";
|
||||||
import { Button } from "antd";
|
import { Button, Space } from "antd";
|
||||||
|
|
||||||
import { ProblemApi } from "../api/problem.ts";
|
import { ProblemApi } from "../api/problem.ts";
|
||||||
|
|
||||||
@ -35,9 +35,15 @@ const columns: ProColumns<ProblemList>[] = [
|
|||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
render: (_node, entity) => {
|
render: (_node, entity) => {
|
||||||
return (
|
return (
|
||||||
<Button>
|
<Space>
|
||||||
<Link to={`/problem/${entity.id}`}>View</Link>
|
<Button>
|
||||||
</Button>
|
<Link to={`/problem/${entity.id}`}>查看问题</Link>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Button>
|
||||||
|
<Link to={`/problem/${entity.id}/status`}>查看评测记录</Link>
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user