在这里插入代码片
//pagination.vue
共 {{ totalCount }} 条
//父组件
import MyPagination from “@/components/pagination/pagination”
export default {
name: “”,
components: {
MyPagination
},
data() {
return {
list: [],
curPage:1,
curSize:8,
pageTotal:0
};
},
methods:{
async getList(){
let res = await this.$Http.getCraftInstructorInterList({
pageNumber: this.curPage,
pageSize:this.curSize,
});
this.list = res.data.rows
this.pageTotal = res.data.total
},
}
}
<my-pagination all :currentPage.sync=“curPage”
:limit.sync=“curSize”
:totalCount=“pageTotal”
@turn=“getList”>