|
@@ -35,14 +35,7 @@
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="page">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage4"
|
|
|
- :page-size="8"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="1"
|
|
|
- >
|
|
|
+ <el-pagination @current-change="search" :current-page="currentPage" :page-size="pageSize" layout="total, prev, pager, next, jumper" :total="total">
|
|
|
</el-pagination>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -56,15 +49,20 @@ export default {
|
|
|
newsList: null,
|
|
|
Color: null,
|
|
|
title: { type: String, default: '就业动态' },
|
|
|
+ total: { type: Number, defaultl: 0 },
|
|
|
},
|
|
|
components: {},
|
|
|
data: () => ({
|
|
|
- title: '就业动态',
|
|
|
- currentPage4: 1,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 8,
|
|
|
}),
|
|
|
created() {},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
+ search(page) {
|
|
|
+ let skip = (page - 1) * this.pageSize;
|
|
|
+ this.$emit('search', { skip: skip, limit: this.pageSize });
|
|
|
+ },
|
|
|
handleSizeChange(val) {
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
},
|