feat(page): 新增 @jump 回调函数

This commit is contained in:
就眠仪式
2021-10-11 00:11:54 +08:00
parent 147a55e038
commit 9f18058e9e
3 changed files with 30 additions and 1 deletions

View File

@@ -82,6 +82,8 @@ const totalPage = ref(Math.ceil(props.total / inlimit.value))
const currentPage: Ref<number> = ref(1)
const currentPageShow: Ref<number> = ref(currentPage.value)
const emit = defineEmits(['jump'])
const prev = function () {
if (currentPage.value === 1) {
return
@@ -111,5 +113,7 @@ watch(inlimit, function () {
watch(currentPage, function () {
currentPageShow.value = currentPage.value
emit('jump', {current: currentPage.value})
})
</script>