update icons
This commit is contained in:
@@ -5,6 +5,7 @@ import { problem } from "oj/composables/problem"
|
||||
import { Problem, ProblemStatus } from "utils/types"
|
||||
import { createTestSubmission } from "utils/judge"
|
||||
import { useThemeVars } from "naive-ui"
|
||||
import { Icon } from "@iconify/vue"
|
||||
|
||||
type Sample = Problem["samples"][number] & {
|
||||
id: number
|
||||
@@ -99,17 +100,37 @@ function type(status: ProblemStatus) {
|
||||
<n-tag>{{ problem._id }}</n-tag>
|
||||
<h2 class="problemTitle">{{ problem.title }}</h2>
|
||||
</n-space>
|
||||
<p class="title" :style="style">描述</p>
|
||||
<p class="title" :style="style">
|
||||
<n-flex align="center">
|
||||
<Icon icon="streamline-emojis:sparkles"></Icon>
|
||||
描述
|
||||
</n-flex>
|
||||
</p>
|
||||
<div class="content" v-html="problem.description"></div>
|
||||
|
||||
<p class="title" :style="style">输入</p>
|
||||
<p class="title" :style="style">
|
||||
<n-flex align="center">
|
||||
<Icon icon="streamline-emojis:four-leaf-clover"></Icon>
|
||||
输入
|
||||
</n-flex>
|
||||
</p>
|
||||
<div class="content" v-html="problem.input_description"></div>
|
||||
|
||||
<p class="title" :style="style">输出</p>
|
||||
<p class="title" :style="style">
|
||||
<n-flex align="center">
|
||||
<Icon icon="streamline-emojis:herb"></Icon>
|
||||
输出
|
||||
</n-flex>
|
||||
</p>
|
||||
<div class="content" v-html="problem.output_description"></div>
|
||||
|
||||
<div v-if="problem.hint">
|
||||
<p class="title" :style="style">提示</p>
|
||||
<p class="title" :style="style">
|
||||
<n-flex align="center">
|
||||
<Icon icon="streamline-emojis:seedling"></Icon>
|
||||
提示
|
||||
</n-flex>
|
||||
</p>
|
||||
<div class="content" v-html="problem.hint"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import SubmissionResultTag from "~/shared/components/SubmissionResultTag.vue"
|
||||
import Pagination from "~/shared/components/Pagination.vue"
|
||||
import { NButton } from "naive-ui"
|
||||
import { renderTableTitle } from "~/utils/renders"
|
||||
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
@@ -15,7 +16,7 @@ const router = useRouter()
|
||||
|
||||
const columns: DataTableColumn<Submission>[] = [
|
||||
{
|
||||
title: "提交时间",
|
||||
title: renderTableTitle("提交时间", "noto:seven-oclock"),
|
||||
key: "create_time",
|
||||
width: 200,
|
||||
render: (row) =>
|
||||
@@ -25,7 +26,7 @@ const columns: DataTableColumn<Submission>[] = [
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "编号",
|
||||
title: renderTableTitle("编号", "fluent-emoji-flat:input-numbers"),
|
||||
key: "id",
|
||||
minWidth: 160,
|
||||
render: (row) => {
|
||||
@@ -48,13 +49,16 @@ const columns: DataTableColumn<Submission>[] = [
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
title: renderTableTitle("状态", "streamline-emojis:panda-face"),
|
||||
key: "status",
|
||||
width: 140,
|
||||
render: (row) => h(SubmissionResultTag, { result: row.result }),
|
||||
},
|
||||
{
|
||||
title: "语言",
|
||||
title: renderTableTitle(
|
||||
"语言",
|
||||
"streamline-emojis:globe-showing-europe-africa",
|
||||
),
|
||||
key: "language",
|
||||
width: 100,
|
||||
render: (row) => LANGUAGE_SHOW_VALUE[row.language],
|
||||
|
||||
@@ -9,6 +9,7 @@ import { getProblemTagList } from "~/shared/api"
|
||||
import Pagination from "~/shared/components/Pagination.vue"
|
||||
import { isDesktop } from "~/shared/composables/breakpoints"
|
||||
import { Icon } from "@iconify/vue"
|
||||
import { renderTableTitle } from "~/utils/renders"
|
||||
|
||||
interface Tag {
|
||||
id: number
|
||||
@@ -150,29 +151,48 @@ onMounted(() => {
|
||||
|
||||
const baseColumns: DataTableColumn<ProblemFiltered>[] = [
|
||||
{
|
||||
title: "状态",
|
||||
title: renderTableTitle("状态", "streamline-emojis:musical-note"),
|
||||
key: "status",
|
||||
width: 60,
|
||||
width: 80,
|
||||
align: "center",
|
||||
render: (row) => h(ProblemStatus, { status: row.status }),
|
||||
},
|
||||
{ title: "编号", key: "_id", width: 100 },
|
||||
{ title: "题目", key: "title", minWidth: 200 },
|
||||
{
|
||||
title: "难度",
|
||||
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:mushroom"),
|
||||
key: "difficulty",
|
||||
width: 100,
|
||||
render: (row) =>
|
||||
h(NTag, { type: getTagColor(row.difficulty) }, () => row.difficulty),
|
||||
},
|
||||
{
|
||||
title: "标签",
|
||||
title: renderTableTitle("标签", "fluent-emoji-flat:keycap-hashtag"),
|
||||
key: "tags",
|
||||
width: 260,
|
||||
render: (row) =>
|
||||
h(NSpace, () => row.tags.map((t) => h(NTag, { key: t }, () => t))),
|
||||
},
|
||||
{ title: "提交数", key: "submission", width: 100 },
|
||||
{ title: "通过率", key: "rate", width: 100 },
|
||||
{
|
||||
title: renderTableTitle("提交数", "streamline-emojis:clinking-beer-mugs"),
|
||||
key: "submission",
|
||||
align: "center",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: renderTableTitle("通过率", "streamline-emojis:clapping-hands-1"),
|
||||
key: "rate",
|
||||
width: 100,
|
||||
align: "center",
|
||||
},
|
||||
]
|
||||
|
||||
const columns = computed(() =>
|
||||
|
||||
Reference in New Issue
Block a user