|
|
@@ -38,7 +38,7 @@
|
|
|
small
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :current-page="params.content.pageNumber"
|
|
|
+ :current-page="currentPage"
|
|
|
:page-sizes="[20, 50, 100, 200]"
|
|
|
layout="total, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
@@ -76,6 +76,7 @@ export default {
|
|
|
productList:[],
|
|
|
itemno:'',
|
|
|
total:0,
|
|
|
+ currentPage:0,
|
|
|
params: {
|
|
|
"id": 20221124140102,
|
|
|
"content": {
|
|
|
@@ -115,6 +116,7 @@ export default {
|
|
|
let res = await this.$api.requested(this.params)
|
|
|
this.productList = res.data
|
|
|
this.total = res.total
|
|
|
+ this.currentPage = res.pageNumber
|
|
|
console.log(this.productList);
|
|
|
|
|
|
},
|
|
|
@@ -197,12 +199,16 @@ export default {
|
|
|
this.selectProductLength = data.length
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
+ console.log(val)
|
|
|
// console.log(`每页 ${val} 条`);
|
|
|
this.params.content.pageSize = val
|
|
|
+ this.getProductList()
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
+ console.log(val)
|
|
|
// console.log(`当前页: ${val}`);
|
|
|
this.params.content.pageNumber = val
|
|
|
+ this.getProductList()
|
|
|
},
|
|
|
},
|
|
|
};
|