We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.5.0
Windows10,Chrome 80.0.3987.149,Vue 2.6.10
https://www.antdv.com/components/pagination-cn/
<template> <div style="margin-top:300px;margin-left:50px;"> <a-pagination showSizeChanger :pageSize.sync="pageSize" @showSizeChange="onShowSizeChange" :total="total" v-model="current" /> </div> </template> <script> export default { name: "templateMgr", data() { return { pageSize: 20, current: 1, total: 0 }; }, mounted() { this.getData(); }, methods: { onShowSizeChange(current, pageSize) { console.log(current, pageSize); }, getData() { this.total = 200; } } }; </script> <style lang="less" scoped></style>
分页页码1应处于选中状态,并且选择更改pageSize下拉选择框时,控制台输出的current变量值应与当前页一致。
分页页码1未处于选中状态,更改pageSize,控制台输出的current变量值为0。
本例中将mounted钩子函数改为created,则可以运行正常。但若getData方法中改变this.total变量值操作处于异步操作环境中,分页页码默认选中状态时好时坏。
The text was updated successfully, but these errors were encountered:
duplicate #1989
Sorry, something went wrong.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
No branches or pull requests
Version
1.5.0
Environment
Windows10,Chrome 80.0.3987.149,Vue 2.6.10
Reproduction link
https://www.antdv.com/components/pagination-cn/
Steps to reproduce
What is expected?
分页页码1应处于选中状态,并且选择更改pageSize下拉选择框时,控制台输出的current变量值应与当前页一致。
What is actually happening?
分页页码1未处于选中状态,更改pageSize,控制台输出的current变量值为0。
本例中将mounted钩子函数改为created,则可以运行正常。但若getData方法中改变this.total变量值操作处于异步操作环境中,分页页码默认选中状态时好时坏。
The text was updated successfully, but these errors were encountered: