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

@@ -10,7 +10,6 @@ const contestStore = useContestStore()
<template>
<n-popover
v-if="contestStore.contest"
trigger="click"
placement="bottom-end"
:show-arrow="false"
>

View File

@@ -46,7 +46,7 @@ const options: DropdownOption[] = [
比赛排名
</n-button>
</n-space>
<n-dropdown v-else :options="options" trigger="click" @select="goto">
<n-dropdown v-else :options="options" @select="goto">
<n-button>菜单</n-button>
</n-dropdown>
</div>

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>