Skip to content
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

[Feature Request] 本地分页时,期望不需要调用 refreshToPage #166

Open
PurpleNoon opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@PurpleNoon
Copy link

请详细描述您的需求或想法
期望使用本地分页时,不需要调用 refreshToPage 就可以使用 scrollIntoViewByIndex

// <z-paging ref="pagingRef"> ... </z-paging>
const pagingRef = ref()

// 调用前已使用 setLocalPaging 设置本地分页数据

// 修改前
const jumpTo = async (
  targetPageNo : number
) => {
  await pagingRef.value?.refreshToPage(targetPageNo)
  await pagingRef.value?.scrollIntoViewByIndex(itemIndex)
}

// 修改后
const jumpTo = async (
  targetPageNo : number
) => {
  await pagingRef.value?.scrollIntoViewByIndex(itemIndex)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant