fix: 翻页后自动滚动到顶部,确保用户看到筛选信息栏
This commit is contained in:
@@ -80,6 +80,8 @@ const loadJokes = async (p = 1) => {
|
|||||||
if (filterTypeIds.value.length) params.type_ids = filterTypeIds.value.join(',')
|
if (filterTypeIds.value.length) params.type_ids = filterTypeIds.value.join(',')
|
||||||
if (filterCrowdIds.value.length) params.crowd_ids = filterCrowdIds.value.join(',')
|
if (filterCrowdIds.value.length) params.crowd_ids = filterCrowdIds.value.join(',')
|
||||||
await jokeStore.fetchJokes(params)
|
await jokeStore.fetchJokes(params)
|
||||||
|
// 翻页后滚动到顶部,确保用户能看到筛选信息栏
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const clearFilter = () => {
|
const clearFilter = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user