Parcourir la source

修复分页组件在切换页面时向外部回传数组的问题

kagg886 il y a 1 mois
Parent
commit
7f3c03f463
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      src/components/pagination/index.vue

+ 3 - 2
src/components/pagination/index.vue

@@ -5,7 +5,8 @@
 </template>
 
 <script lang="ts">
-import { toRefs, defineComponent, computed } from 'vue';
+import { computed, defineComponent, toRefs } from 'vue'
+
 const props = {
   total: {
     required: true,
@@ -69,7 +70,7 @@ export default defineComponent({
       emit('pagination', { page: currentPage.value, limit: val })
     };
     const handleCurrentChange = (val: number) => {
-      emit('pagination', { page: val, limit: pageSizes.value })
+      emit('pagination', { page: val, limit: pageSize.value })
     }
     return {
       currentPage,