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
useTable
current=1
1.2.3
Windows (64)
None
use-table于search组件用v-model直传参数,查询时没去重置 current = 1,导致结果少于当前页码后表格直接无数据。
use-table
search
v-model
而且部分接口返回的current参数是带修正的,total实际分页少于传参current会重置为1,直接导致页面显示空且当前页为1,但实际是api查询非第一页。
current
total
1
api
考虑使用方案:getData(options?: { resetFirstPage?: boolean })
getData(options?: { resetFirstPage?: boolean })
应当重置第一页,demo 的虚拟数据无法展示这个逻辑。
demo
空白且是虚假的第一页
No response
The text was updated successfully, but these errors were encountered:
提供一个函数 getDataByPageNum
function getDataByPage(pageNum: number = 1) { updateSearchParams({ current: pageNum }); getData(); }
Sorry, something went wrong.
提供一个函数 getDataByPageNum function getDataByPage(pageNum: number = 1) { updateSearchParams({ current: pageNum }); getData(); }
也可行,没毛病
PS:唯一想到如果有其他没考虑到的场景时会不会导致getDataByXXX膨胀问题?可能还会有选项复用叠加问题(ByXxxAndYyy)。
getDataByXXX
425c69a
No branches or pull requests
软件版本
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: