|
@@ -50,7 +50,7 @@ Add more modules based on your scenario.
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage1"
|
|
|
+ :current-page.sync="currentPage1"
|
|
|
:page-size="100"
|
|
|
layout="total, prev, pager, next"
|
|
|
:total="1000">
|
|
@@ -61,7 +61,7 @@ Add more modules based on your scenario.
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage2"
|
|
|
+ :current-page.sync="currentPage2"
|
|
|
:page-sizes="[100, 200, 300, 400]"
|
|
|
:page-size="100"
|
|
|
layout="sizes, prev, pager, next"
|
|
@@ -73,7 +73,7 @@ Add more modules based on your scenario.
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage3"
|
|
|
+ :current-page.sync="currentPage3"
|
|
|
:page-size="100"
|
|
|
layout="prev, pager, next, jumper"
|
|
|
:total="1000">
|
|
@@ -84,7 +84,7 @@ Add more modules based on your scenario.
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage4"
|
|
|
+ :current-page.sync="currentPage4"
|
|
|
:page-sizes="[100, 200, 300, 400]"
|
|
|
:page-size="100"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
@@ -99,7 +99,6 @@ Add more modules based on your scenario.
|
|
|
console.log(`${val} items per page`);
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- this.currentPage = val;
|
|
|
console.log(`current page: ${val}`);
|
|
|
}
|
|
|
},
|
|
@@ -131,7 +130,6 @@ Add more modules based on your scenario.
|
|
|
console.log(`${val} items per page`);
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- this.currentPage = val;
|
|
|
console.log(`current page: ${val}`);
|
|
|
}
|
|
|
},
|
|
@@ -154,7 +152,7 @@ Add more modules based on your scenario.
|
|
|
| page-size | item count of each page | number | — | 10 |
|
|
|
| total | total item count | number | — | — |
|
|
|
| page-count | total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required | number | — | — |
|
|
|
-| current-page | current page number | number | — | 1 |
|
|
|
+| current-page | current page number, supports the .sync modifier | number | — | 1 |
|
|
|
| layout | layout of Pagination, elements separated with a comma | string | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total' |
|
|
|
| page-sizes | options of item count per page | number[] | — | [10, 20, 30, 40, 50, 100] |
|
|
|
|