分页器

This commit is contained in:
xing 2020-06-18 11:28:02 +08:00
parent f1cb71044c
commit dfed24cdfb
2 changed files with 22 additions and 0 deletions

View File

@ -15,4 +15,7 @@ html,body,#app{
.el-table { .el-table {
margin-top: 15px; margin-top: 15px;
font-size: 15px; font-size: 15px;
}
.el-pagination {
margin-top: 15px;
} }

View File

@ -43,6 +43,17 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pagenum"
:page-sizes="[1, 2, 20, 50]"
:page-size="queryInfo.pagesize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
</el-card> </el-card>
</div> </div>
@ -63,6 +74,14 @@ export default {
} }
}, },
methods: { methods: {
handleSizeChange (val) {
this.queryInfo.pagesize = val
this.getUserList()
},
handleCurrentChange (val) {
this.queryInfo.pagenum = val
this.getUserList()
},
changeState (state) { changeState (state) {
console.log(state) console.log(state)
}, },