- 前台 53 处表头改成纯文字,删掉只剩这一个用途的 utils/renders.ts - 「已结束」从红色改灰色(比赛列表 / 详情 / 后台 / 首页一起) - 比赛列表第一页、无筛选时顶部列出进行中和即将开始的比赛 - 内容少的页面页脚贴底,不再悬在半屏 - 排名页两张柱状图挪到最后,第一屏是 Top100、本周进步榜和我的排名 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
1.1 KiB
Vue
61 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import type { ProblemRow } from "utils/types"
|
|
import ProblemStatus from "oj/problem/components/ProblemStatus.vue"
|
|
import { useContestStore } from "oj/store/contest"
|
|
|
|
const props = defineProps<{ contestID: string }>()
|
|
|
|
const router = useRouter()
|
|
const contestStore = useContestStore()
|
|
const problemsColumns: DataTableColumn<ProblemRow>[] = [
|
|
{
|
|
title: "状态",
|
|
key: "status",
|
|
width: 100,
|
|
render: (row) => h(ProblemStatus, { status: row.status }),
|
|
},
|
|
{
|
|
title: "编号",
|
|
key: "_id",
|
|
width: 100,
|
|
},
|
|
{
|
|
title: "题目",
|
|
key: "title",
|
|
minWidth: 200,
|
|
},
|
|
{
|
|
title: "提交数",
|
|
key: "submissionCount",
|
|
align: "center",
|
|
width: 120,
|
|
},
|
|
{
|
|
title: "通过率",
|
|
key: "acRate",
|
|
align: "center",
|
|
width: 120,
|
|
},
|
|
]
|
|
|
|
function rowProps(row: ProblemRow) {
|
|
return {
|
|
style: "cursor: pointer",
|
|
onClick() {
|
|
router.push(`/contest/${props.contestID}/problem/${row._id}`)
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<n-data-table
|
|
striped
|
|
:data="contestStore.problems"
|
|
:columns="problemsColumns"
|
|
:row-props="rowProps"
|
|
/>
|
|
</template>
|
|
|
|
<style scoped></style>
|