fix
This commit is contained in:
@@ -98,7 +98,7 @@ async function listComments() {
|
||||
|
||||
onMounted(listComments)
|
||||
watch(() => [query.page, query.limit], listComments)
|
||||
watchDebounced(() => [query.problem], listComments, {
|
||||
watchDebounced(() => query.problem, listComments, {
|
||||
debounce: 500,
|
||||
maxWait: 1000,
|
||||
})
|
||||
|
||||
@@ -35,7 +35,7 @@ async function addProblem() {
|
||||
<template>
|
||||
<n-popconfirm :show-icon="false" @positive-click="addProblem">
|
||||
<template #trigger>
|
||||
<n-button secondary size="small" type="primary">+</n-button>
|
||||
<n-button secondary size="small" type="primary">添加</n-button>
|
||||
</template>
|
||||
<n-flex vertical>
|
||||
<span>请输入在这场比赛中的显示编号</span>
|
||||
|
||||
@@ -58,7 +58,8 @@ watch(
|
||||
if (value) getList()
|
||||
},
|
||||
)
|
||||
watch(query, getList, { deep: true })
|
||||
watch(() => [query.limit, query.page], getList)
|
||||
watchDebounced(() => query.keyword, getList, { debounce: 500, maxWait: 1000 })
|
||||
</script>
|
||||
<template>
|
||||
<n-modal
|
||||
@@ -72,6 +73,7 @@ watch(query, getList, { deep: true })
|
||||
<n-input
|
||||
class="search"
|
||||
v-model:value="query.keyword"
|
||||
clearable
|
||||
placeholder="搜索标题或编号"
|
||||
/>
|
||||
<n-data-table striped :columns="columns" :data="problems" />
|
||||
|
||||
@@ -115,7 +115,7 @@ watch(
|
||||
},
|
||||
)
|
||||
watchDebounced(
|
||||
() => [query.keyword],
|
||||
() => query.keyword,
|
||||
() => {
|
||||
query.page = 1
|
||||
routerPush()
|
||||
|
||||
@@ -118,7 +118,7 @@ watch(
|
||||
},
|
||||
)
|
||||
watchDebounced(
|
||||
() => [query.keyword],
|
||||
() => query.keyword,
|
||||
() => {
|
||||
query.page = 1
|
||||
routerPush()
|
||||
|
||||
Reference in New Issue
Block a user