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