This commit is contained in:
2023-04-14 09:25:58 +08:00
parent 921ea417dd
commit 8da14bafef
10 changed files with 103 additions and 69 deletions

View File

@@ -14,7 +14,12 @@ const contestStore = useContestStore()
:show-arrow="false"
>
<template #trigger>
<n-button>比赛信息</n-button>
<n-button>
<template #icon>
<i-ep-warning />
</template>
比赛信息
</n-button>
</template>
<div v-html="contestStore.contest.description"></div>
<n-descriptions bordered label-placement="left" :column="1">

View File

@@ -24,12 +24,11 @@ function getCurrentType(name: string): "primary" | "default" {
return "default"
}
const options = computed<DropdownOption[]>(() => [
const options: DropdownOption[] = [
{ label: "比赛题目", key: "problems" },
{ label: "提交信息", key: "submissions" },
{ label: "比赛排名", key: "rank" },
{ label: "管理员助手", key: "helper", show: contestStore.isContestAdmin },
])
]
</script>
<template>
<div v-if="contestMenuVisible">
@@ -46,13 +45,6 @@ const options = computed<DropdownOption[]>(() => [
<n-button :type="getCurrentType('rank')" @click="goto('rank')">
比赛排名
</n-button>
<n-button
v-if="contestStore.isContestAdmin"
:type="getCurrentType('helper')"
@click="goto('helper')"
>
管理员助手
</n-button>
</n-space>
<n-dropdown v-else :options="options" trigger="click" @select="goto">
<n-button>菜单</n-button>

View File

@@ -1,13 +0,0 @@
<script lang="ts" setup>
const columns: DataTableColumn[] = [
{ title: "AC 时间", key: "ac_time" },
{ title: "问题 ID", key: "problem_display_id" },
{ title: "一血", key: "is_first_ac" },
{ title: "用户名", key: "username" },
{ title: "状态", key: "status" },
{ title: "选项", key: "actions" },
]
</script>
<template>
<n-data-table :columns="columns"></n-data-table>
</template>