@@ -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,33 +150,33 @@ 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}`,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
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,
|
||||||
{
|
{
|
||||||
type: "success",
|
type: "success",
|
||||||
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" }, () => "进行中")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user