update icons

This commit is contained in:
2024-06-27 02:15:27 +00:00
parent 4637c9479b
commit 905e13b740
18 changed files with 222 additions and 92 deletions

View File

@@ -2,6 +2,7 @@
import { ProblemFiltered } from "utils/types"
import ProblemStatus from "~/oj/problem/components/ProblemStatus.vue"
import { useContestStore } from "~/oj/store/contest"
import { renderTableTitle } from "~/utils/renders"
const props = defineProps<{ contestID: string }>()
@@ -9,15 +10,33 @@ const router = useRouter()
const contestStore = useContestStore()
const problemsColumns: DataTableColumn<ProblemFiltered>[] = [
{
title: "状态",
title: renderTableTitle("状态", "streamline-emojis:musical-note"),
key: "status",
width: 60,
width: 100,
render: (row) => h(ProblemStatus, { status: row.status }),
},
{ title: "编号", key: "_id", width: 60 },
{ title: "题目", key: "title", minWidth: 200 },
{ title: "总提交数", key: "submission", width: 100 },
{ title: "通过率", key: "rate", width: 100 },
{
title: renderTableTitle("编号", "fluent-emoji-flat:input-numbers"),
key: "_id",
width: 100,
},
{
title: renderTableTitle("题目", "streamline-emojis:rice-ball"),
key: "title",
minWidth: 200,
},
{
title: renderTableTitle("提交数", "streamline-emojis:clinking-beer-mugs"),
key: "submission",
align: "center",
width: 120,
},
{
title: renderTableTitle("通过率", "streamline-emojis:clapping-hands-1"),
key: "rate",
align: "center",
width: 120,
},
]
function rowProps(row: ProblemFiltered) {

View File

@@ -8,6 +8,7 @@ import { secondsToDuration } from "utils/functions"
import { ContestStatus } from "~/utils/constants"
import { useContestStore } from "~/oj/store/contest"
import { Icon } from "@iconify/vue"
import { renderTableTitle } from "~/utils/renders"
interface Props {
contestID: string
@@ -44,15 +45,18 @@ const query = reactive({
const columns = ref<DataTableColumn<ContestRank>[]>([
{
title: "排名",
title: renderTableTitle("编号", "fluent-emoji-flat:input-numbers"),
key: "id",
width: 60,
width: 80,
fixed: "left",
align: "center",
render: (_, index) => index + (query.page - 1) * query.limit + 1,
},
{
title: "用户",
title: renderTableTitle(
"用户",
"streamline-emojis:smiling-face-with-sunglasses",
),
key: "username",
width: 120,
fixed: "left",
@@ -69,9 +73,12 @@ const columns = ref<DataTableColumn<ContestRank>[]>([
),
},
{
title: "正确数/总提交",
title: renderTableTitle(
"正确数/总提交",
"streamline-emojis:artist-palette",
),
key: "submission",
width: 120,
width: 140,
align: "center",
render: (row) => h(AcAndSubmission, { rank: row }),
},
@@ -133,9 +140,9 @@ async function addColumns() {
if (status.is_first_ac) {
acTime = [
h(Icon, {
icon: "openmoji:1st-place-medal",
height: 24,
width: 24,
icon: "fluent-emoji:1st-place-medal",
height: 20,
width: 20,
}),
h("span", secondsToDuration(status.ac_time)),
]