fix.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user