更新首页列表
This commit is contained in:
@@ -18,7 +18,7 @@ async function addProblem() {
|
||||
await addProblemForContest(
|
||||
props.contestID,
|
||||
props.problemID,
|
||||
displayID.value
|
||||
displayID.value,
|
||||
)
|
||||
emit("added")
|
||||
} catch (err: any) {
|
||||
|
||||
@@ -47,7 +47,7 @@ async function getList() {
|
||||
query.limit,
|
||||
query.keyword,
|
||||
"",
|
||||
"ACM"
|
||||
"ACM",
|
||||
)
|
||||
total.value = res.total
|
||||
problems.value = res.results
|
||||
@@ -56,7 +56,7 @@ watch(
|
||||
() => props.show,
|
||||
(value) => {
|
||||
if (value) getList()
|
||||
}
|
||||
},
|
||||
)
|
||||
watch(query, getList, { deep: true })
|
||||
</script>
|
||||
|
||||
@@ -33,7 +33,7 @@ const title = computed(
|
||||
"admin problem edit": "编辑题目",
|
||||
"admin contest problem create": "新建比赛题目",
|
||||
"admin contest problem edit": "编辑比赛题目",
|
||||
}[<string>route.name])
|
||||
})[<string>route.name],
|
||||
)
|
||||
const problem = reactive<BlankProblem>({
|
||||
_id: "",
|
||||
@@ -91,7 +91,7 @@ const languageOptions = [
|
||||
]
|
||||
|
||||
const tagOptions = computed(() =>
|
||||
existingTags.value.map((tag) => ({ label: tag.name, value: tag.name }))
|
||||
existingTags.value.map((tag) => ({ label: tag.name, value: tag.name })),
|
||||
)
|
||||
|
||||
async function getProblemDetail() {
|
||||
@@ -233,7 +233,7 @@ function detectProblemCompletion() {
|
||||
// 样例是空的
|
||||
else if (
|
||||
problem.samples.some(
|
||||
(sample) => sample.output === "" || sample.input === ""
|
||||
(sample) => sample.output === "" || sample.input === "",
|
||||
)
|
||||
) {
|
||||
message.error("空样例没有删干净")
|
||||
|
||||
@@ -20,10 +20,10 @@ const title = computed(
|
||||
({
|
||||
"admin problem list": "题目列表",
|
||||
"admin contest problem list": "比赛题目列表",
|
||||
}[<string>route.name])
|
||||
})[<string>route.name],
|
||||
)
|
||||
const isContestProblemList = computed(
|
||||
() => route.name === "admin contest problem list"
|
||||
() => route.name === "admin contest problem list",
|
||||
)
|
||||
|
||||
const [show, toggleShow] = useToggle()
|
||||
@@ -77,7 +77,7 @@ async function listProblems() {
|
||||
offset,
|
||||
query.limit,
|
||||
query.keyword,
|
||||
props.contestID
|
||||
props.contestID,
|
||||
)
|
||||
total.value = res.total
|
||||
problems.value = res.results
|
||||
|
||||
Reference in New Issue
Block a user