更新方式

This commit is contained in:
luyuan 2020-11-25 14:54:31 +08:00
parent 13eef1ff7b
commit 3f5da584eb
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -67,7 +67,7 @@
<a-empty />
</template>
<div class="pages">
<a-pagination v-if="livelist.total" v-model:current="page" :total="livelist.total" :showLessItems="true" />
<a-pagination v-if="livelist.total" v-model:current="page" :total="livelist.total" :showLessItems="true" @change="nextpage" />
</div>
</div>
</template>
@ -216,14 +216,11 @@ export default defineComponent({
console.log(input.value);
livelist.value = await getlivelist({title: input.value});
}
async function naxtpage(){
async function nextpage(){
console.log(input.value);
livelist.value = await getlivelist({title: input.value, page: page.value});
}
watch(page,()=>{
console.log(page.value)
naxtpage()
})
return {
page,
@ -232,7 +229,8 @@ export default defineComponent({
livelist,
input,
sel,
lan
lan,
nextpage
};
},
});