Skip to content

Commit

Permalink
feat: 空数据时不触底更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Plumbiu committed Feb 20, 2023
1 parent 7031821 commit 2ab24ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/components/ArticlesList/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const isLoading = useState('isLoading', () => false)
const route = useRoute()
let pagenum = 1
const addArtListItem = useThrottle(async () => {
useScrollBottom() && artlist.value.push(...(await useFetchPostData(route?.params, route.query?.sort, ++pagenum)))
useScrollBottom() && artlist.value?.length && artlist.value.push(...(await useFetchPostData(route?.params, route.query?.sort, ++pagenum)))
})
provide('artlist', artlist)
provide('ads', articleAds)
Expand Down

0 comments on commit 2ab24ae

Please sign in to comment.