From 2f8a257efd2b64dc40666b0d332edb7824a9768d Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 27 四月 2025 09:58:29 +0800 Subject: [PATCH] remove all semicolons --- src/components/Pagination/index.vue | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index cdd3c3e..53fbec2 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -59,7 +59,7 @@ } }) -const emit = defineEmits(); +const emit = defineEmits() const currentPage = computed({ get() { return props.page @@ -76,25 +76,28 @@ emit('update:limit', val) } }) + function handleSizeChange(val) { + if (currentPage.value * val > props.total) { + currentPage.value = 1 + } emit('pagination', { page: currentPage.value, limit: val }) if (props.autoScroll) { scrollTo(0, 800) } } + function handleCurrentChange(val) { emit('pagination', { page: val, limit: pageSize.value }) if (props.autoScroll) { scrollTo(0, 800) } } - </script> <style scoped> .pagination-container { background: #fff; - padding: 32px 16px; } .pagination-container.hidden { display: none; -- Gitblit v1.9.3