123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <el-pagination
- class="adm-pagination"
- @size-change="sizeChange"
- @current-change="currentPage"
- :page-sizes="paginationList.sizes"
- :page-size="paginationList.size"
- :current-page.sync="paginationList.page"
- layout="total,sizes,prev,pager,next,jumper"
- :total="paginationList.total"
- />
- </template>
- <script lang="ts">
- // 当前页,总数,范围
- interface Pagination {
- page:number,
- size: number
- total: number
- sizes: []
- }
- import { Vue, Component, Emit, Prop } from "vue-property-decorator";
- @Component({
- name: 'adm-pagination'
- })
- export default class extends Vue {
- @Prop({ type: Object, default: {} }) paginationList ?: Pagination
- @Emit('currentPage')
- currentPage(val: number) {
- return val
- }
- sizeChange(val:number) {
- console.log(val)
- }
- }
- </script>
- <style scoped>
- </style>
|