add contest problem.

This commit is contained in:
2023-01-31 15:38:29 +08:00
parent 6aa722c64a
commit d5d6491d6d
16 changed files with 210 additions and 89 deletions

View File

@@ -30,6 +30,17 @@ const options: SelectOption[] = [
]
const columns: DataTableColumn<Contest>[] = [
{
title: "状态",
key: "status",
width: 100,
render: (row) =>
h(
NTag,
{ type: CONTEST_STATUS[row.status]["type"] },
() => CONTEST_STATUS[row.status]["name"]
),
},
{
title: "比赛",
key: "title",
@@ -48,17 +59,6 @@ const columns: DataTableColumn<Contest>[] = [
width: 180,
render: (row) => duration(row.start_time, row.end_time),
},
{
title: "状态",
key: "status",
width: 100,
render: (row) =>
h(
NTag,
{ type: CONTEST_STATUS[row.status]["type"] },
() => CONTEST_STATUS[row.status]["name"]
),
},
]
async function listContests() {
@@ -129,7 +129,7 @@ function rowProps(row: Contest) {
</n-form-item>
<n-form-item label="搜索比赛标题">
<n-input
placeholder="输入后回车"
placeholder="输入后回车或点击搜索"
v-model:value="query.keyword"
@change="search"
/>