gaoluyang
2025-05-26 50478b84da86ef020c2fcb6de2855644a95fee10
src/components/Pagination/index.vue
@@ -59,7 +59,7 @@
  }
})
const emit = defineEmits();
const emit = defineEmits()
const currentPage = computed({
  get() {
    return props.page
@@ -76,6 +76,7 @@
    emit('update:limit', val)
  }
})
function handleSizeChange(val) {
  if (currentPage.value * val > props.total) {
    currentPage.value = 1
@@ -85,13 +86,13 @@
    scrollTo(0, 800)
  }
}
function handleCurrentChange(val) {
  emit('pagination', { page: val, limit: pageSize.value })
  if (props.autoScroll) {
    scrollTo(0, 800)
  }
}
</script>
<style scoped>