update
This commit is contained in:
@@ -151,52 +151,49 @@ onMounted(() => {
|
|||||||
|
|
||||||
const baseColumns: DataTableColumn<ProblemFiltered>[] = [
|
const baseColumns: DataTableColumn<ProblemFiltered>[] = [
|
||||||
{
|
{
|
||||||
title: renderTableTitle("状态", "streamline-emojis:musical-note"),
|
title: renderTableTitle("状态", "streamline-emojis:high-voltage"),
|
||||||
key: "status",
|
key: "status",
|
||||||
width: 80,
|
width: 80,
|
||||||
align: "center",
|
align: "center",
|
||||||
render: (row) => h(ProblemStatus, { status: row.status }),
|
render: (row) => h(ProblemStatus, { status: row.status }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle("编号", "fluent-emoji-flat:input-numbers"),
|
title: renderTableTitle("编号", "streamline-emojis:game-dice"),
|
||||||
key: "_id",
|
key: "_id",
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle("题目", "streamline-emojis:rice-ball"),
|
title: renderTableTitle("题目", "streamline-emojis:watermelon-2"),
|
||||||
key: "title",
|
key: "title",
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle("难度", "streamline-emojis:mushroom"),
|
title: renderTableTitle("难度", "streamline-emojis:lady-beetle"),
|
||||||
key: "difficulty",
|
key: "difficulty",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (row) =>
|
render: (row) =>
|
||||||
h(NTag, { type: getTagColor(row.difficulty) }, () => row.difficulty),
|
h(NTag, { type: getTagColor(row.difficulty) }, () => row.difficulty),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle("标签", "fluent-emoji-flat:keycap-hashtag"),
|
title: renderTableTitle("标签", "streamline-emojis:paperclip"),
|
||||||
key: "tags",
|
key: "tags",
|
||||||
width: 260,
|
width: 260,
|
||||||
render: (row) =>
|
render: (row) =>
|
||||||
h(NSpace, () => row.tags.map((t) => h(NTag, { key: t }, () => t))),
|
h(NSpace, () => row.tags.map((t) => h(NTag, { key: t }, () => t))),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle(
|
title: renderTableTitle("出题者", "streamline-emojis:man-raising-hand-2"),
|
||||||
"出题者",
|
|
||||||
"streamline-emojis:smiling-face-with-sunglasses",
|
|
||||||
),
|
|
||||||
key: "author",
|
key: "author",
|
||||||
width: 130,
|
width: 130,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle("提交数", "streamline-emojis:clinking-beer-mugs"),
|
title: renderTableTitle("提交数", "streamline-emojis:writing-hand-2"),
|
||||||
key: "submission",
|
key: "submission",
|
||||||
align: "center",
|
align: "center",
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: renderTableTitle("通过率", "streamline-emojis:clapping-hands-1"),
|
title: renderTableTitle("通过率", "streamline-emojis:victory-hand-2"),
|
||||||
key: "rate",
|
key: "rate",
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
align: "center",
|
||||||
@@ -225,7 +222,7 @@ function rowProps(row: ProblemFiltered) {
|
|||||||
<n-form :show-feedback="false" inline label-placement="left">
|
<n-form :show-feedback="false" inline label-placement="left">
|
||||||
<n-form-item label="题目难度">
|
<n-form-item label="题目难度">
|
||||||
<n-select
|
<n-select
|
||||||
style="width: 120px;"
|
style="width: 120px"
|
||||||
v-model:value="query.difficulty"
|
v-model:value="query.difficulty"
|
||||||
:options="difficultyOptions"
|
:options="difficultyOptions"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -39,41 +39,41 @@ const menus = computed<MenuOption[]>(() => [
|
|||||||
{
|
{
|
||||||
label: () => h(RouterLink, { to: "/learn/01" }, { default: () => "自学" }),
|
label: () => h(RouterLink, { to: "/learn/01" }, { default: () => "自学" }),
|
||||||
key: "learn",
|
key: "learn",
|
||||||
icon: renderIcon("devicon:python"),
|
icon: renderIcon("streamline-emojis:snake"),
|
||||||
show: isDesktop.value,
|
show: isDesktop.value,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () => h(RouterLink, { to: "/" }, { default: () => "题库" }),
|
label: () => h(RouterLink, { to: "/" }, { default: () => "题库" }),
|
||||||
key: "problem",
|
key: "problem",
|
||||||
icon: renderIcon("streamline-emojis:santa-claus-2"),
|
icon: renderIcon("streamline-emojis:blossom"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () =>
|
label: () =>
|
||||||
h(RouterLink, { to: "/submission" }, { default: () => "提交" }),
|
h(RouterLink, { to: "/submission" }, { default: () => "提交" }),
|
||||||
key: "submission",
|
key: "submission",
|
||||||
icon: renderIcon("streamline-emojis:christmas-tree"),
|
icon: renderIcon("streamline-emojis:bouquet"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () => h(RouterLink, { to: "/contest" }, { default: () => "比赛" }),
|
label: () => h(RouterLink, { to: "/contest" }, { default: () => "比赛" }),
|
||||||
key: "contest",
|
key: "contest",
|
||||||
icon: renderIcon("streamline-emojis:wrapped-gift-1"),
|
icon: renderIcon("streamline-emojis:cherries"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () => h(RouterLink, { to: "/rank" }, { default: () => "排名" }),
|
label: () => h(RouterLink, { to: "/rank" }, { default: () => "排名" }),
|
||||||
key: "rank",
|
key: "rank",
|
||||||
icon: renderIcon("streamline-emojis:snowman"),
|
icon: renderIcon("streamline-emojis:hibiscus"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () =>
|
label: () =>
|
||||||
h(RouterLink, { to: "/announcement" }, { default: () => "公告" }),
|
h(RouterLink, { to: "/announcement" }, { default: () => "公告" }),
|
||||||
key: "announcement",
|
key: "announcement",
|
||||||
icon: renderIcon("streamline-emojis:snowflake"),
|
icon: renderIcon("streamline-emojis:palm-tree"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: () => h(RouterLink, { to: "/admin" }, { default: () => "后台" }),
|
label: () => h(RouterLink, { to: "/admin" }, { default: () => "后台" }),
|
||||||
show: userStore.isAdminRole,
|
show: userStore.isAdminRole,
|
||||||
key: "admin",
|
key: "admin",
|
||||||
icon: renderIcon("streamline-emojis:unicorn-face"),
|
icon: renderIcon("streamline-emojis:ghost"),
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user