index.vue 503 B

1234567891011121314151617
  1. <template>
  2. <div class="flex justify-end pt-5">
  3. <el-pagination background :layout="layout" :current-page="page" :page-size="limit" @current-change="changePage" @size-change="changeLimit" :total="total" :page-sizes="pageSizes" />
  4. </div>
  5. </template>
  6. <script lang="ts" setup>
  7. import { inject } from 'vue'
  8. const layout = 'total,sizes,prev, pager,next'
  9. const pageSizes = [10, 20, 30, 50]
  10. const { page, limit, total, changePage, changeLimit } = inject('paginate')
  11. </script>
  12. <style scoped></style>