submission list.

This commit is contained in:
2023-01-15 21:32:04 +08:00
parent eaa5a8516e
commit 5d0f34c144
6 changed files with 110 additions and 37 deletions

View File

@@ -90,7 +90,6 @@ const type = (status: Sample["status"]) =>
:closable="false"
center
title="🎉 本 题 已 经 被 你 解 决 啦"
effect="dark"
>
</el-alert>

View File

@@ -47,16 +47,16 @@ async function listProblems() {
problems.value = res.results
}
function routePush() {
function routerPush() {
router.push({
path: "/",
path: route.path,
query: filterEmptyValue(query),
})
}
function search() {
query.page = 1
routePush()
routerPush()
}
function clear() {
@@ -64,7 +64,7 @@ function clear() {
query.tag = ""
query.difficulty = ""
query.page = 1
routePush()
routerPush()
}
async function getRandom() {
@@ -76,13 +76,13 @@ function goProblem(row: any) {
router.push("/problem/" + row._id)
}
watch(() => query.page, routePush)
watch(() => query.page, routerPush)
watch(
() => [query.tag, query.difficulty, query.limit],
() => {
query.page = 1
routePush()
routerPush()
}
)