This commit is contained in:
2024-01-25 14:17:10 +08:00
parent 87fcb12960
commit 6464a1eee6
16 changed files with 191 additions and 148 deletions

View File

@@ -91,12 +91,20 @@ function clear() {
onMounted(listContests)
watch(() => query.page, routerPush)
watch(
() => [query.limit, query.keyword, query.status],
() => [query.limit, query.status],
() => {
query.page = 1
routerPush()
},
)
watchDebounced(
() => [query.keyword],
() => {
query.page = 1
routerPush()
},
{ debounce: 500, maxWait: 1000 },
)
watch(
() => route.name === "contests" && route.query,
(newVal) => {
@@ -129,7 +137,11 @@ function rowProps(row: Contest) {
/>
</n-form-item>
<n-form-item>
<n-input clearable @change="search" placeholder="比赛标题" />
<n-input
clearable
v-model:value="query.keyword"
placeholder="比赛标题"
/>
</n-form-item>
</n-form>
<n-form :show-feedback="false" label-placement="left" inline>