-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
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
[Bug]: useTable
搜索联动时没有重置分页current=1
#499
Labels
bug
Something isn't working
Comments
honghuangdc
added
enhancement
New feature or request
bug
Something isn't working
and removed
enhancement
New feature or request
labels
Jun 17, 2024
提供一个函数 getDataByPageNum function getDataByPage(pageNum: number = 1) {
updateSearchParams({ current: pageNum });
getData();
} |
也可行,没毛病 PS:唯一想到如果有其他没考虑到的场景时会不会导致 |
NHZEX
changed the title
[Bug]:
[Bug]: Jun 17, 2024
use-table
搜索联动时没有重置分页current=1
useTable
搜索联动时没有重置分页current=1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
软件版本
1.2.3
运行环境
Windows (64)
运行架构
None
重现步骤
use-table
于search
组件用v-model
直传参数,查询时没去重置 current = 1,导致结果少于当前页码后表格直接无数据。而且部分接口返回的
current
参数是带修正的,total
实际分页少于传参current
会重置为1
,直接导致页面显示空且当前页为1
,但实际是api
查询非第一页。考虑使用方案:
getData(options?: { resetFirstPage?: boolean })
期望的结果是什么?
应当重置第一页,
demo
的虚拟数据无法展示这个逻辑。实际的结果是什么?
空白且是虚假的第一页
日志记录(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: