update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-12-23 21:24:11 +08:00
parent 5fcbe4703b
commit 2a14fe138f

View File

@@ -4,7 +4,7 @@ import { watchDebounced } from "@vueuse/core"
import { parseTime } from "utils/functions" import { parseTime } from "utils/functions"
import { ProblemSetProgress } from "utils/types" import { ProblemSetProgress } from "utils/types"
import { getProblemSetUserProgress } from "../../api" import { getProblemSetUserProgress } from "../../api"
import { NTag } from "naive-ui" import { NFlex, NTag } from "naive-ui"
import { usePagination } from "shared/composables/pagination" import { usePagination } from "shared/composables/pagination"
import Pagination from "shared/components/Pagination.vue" import Pagination from "shared/components/Pagination.vue"
@@ -150,13 +150,13 @@ const progressColumns = [
) )
return h("div", { style: "max-height: 120px; overflow-y: auto" }, [ return h("div", { style: "max-height: 120px; overflow-y: auto" }, [
h( h(
"div", NFlex,
{ style: "display: flex; flex-wrap: wrap; gap: 4px" }, {},
incompleteProblems.map((problem) => () => incompleteProblems.map((problem) =>
h( h(
NTag, NTag,
{ type: "warning", size: "small", style: "margin: 2px" }, { type: "warning", size: "small", style: "margin: 2px" },
`${problem._id}: ${problem.title}`, () => `${problem._id}: ${problem.title}`,
), ),
), ),
), ),
@@ -164,9 +164,9 @@ const progressColumns = [
} }
return h("div", { style: "max-height: 120px; overflow-y: auto" }, [ return h("div", { style: "max-height: 120px; overflow-y: auto" }, [
h( h(
"div", NFlex,
{ style: "display: flex; flex-wrap: wrap; gap: 4px" }, {},
row.completed_problems.map((problem: any) => () => row.completed_problems.map((problem: any) =>
h( h(
NTag, NTag,
{ {
@@ -174,7 +174,7 @@ const progressColumns = [
size: "small", size: "small",
style: "margin: 2px", style: "margin: 2px",
}, },
`${problem._id}: ${problem.title}`, () => `${problem._id}: ${problem.title}`,
), ),
), ),
), ),
@@ -195,9 +195,9 @@ const progressColumns = [
width: 100, width: 100,
render: (row: ProblemSetProgress) => { render: (row: ProblemSetProgress) => {
if (row.is_completed) { if (row.is_completed) {
return h(NTag, { type: "success" }, "已完成") return h(NTag, { type: "success" }, () => "已完成")
} else { } else {
return h(NTag, { type: "warning" }, "进行中") return h(NTag, { type: "warning" }, () => "进行中")
} }
}, },
}, },