Merge pull request #60 from Undertone0809/login-record-patch

fix: login-records pagination
This commit is contained in:
ronger 2022-11-01 07:28:23 +08:00 committed by GitHub
commit b299acd367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
</el-col> </el-col>
<el-col> <el-col>
<el-table <el-table
:data="records.records" :data="records.list"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
label="登录 IP" label="登录 IP"
@ -29,11 +29,11 @@
:hide-on-single-page="true" :hide-on-single-page="true"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
:current-page="records.pagination.currentPage" :current-page="records.pageNum"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="records.pagination.pageSize" :page-size="records.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="records.pagination.total"> :total="records.total">
</el-pagination> </el-pagination>
</el-col> </el-col>
</el-row> </el-row>
@ -61,7 +61,7 @@ export default {
let _ts = this; let _ts = this;
let search = { let search = {
size: size, size: size,
page: _ts.records.pagination.currentPage page: _ts.records.pageNum
} }
_ts.$emit('currentChange', search); _ts.$emit('currentChange', search);
}, },
@ -69,7 +69,7 @@ export default {
let _ts = this; let _ts = this;
let search = { let search = {
page: page, page: page,
size: _ts.records.pagination.pageSize size: _ts.records.pageSize
} }
_ts.$emit('currentChange', search); _ts.$emit('currentChange', search);
} }