mirror of https://github.com/nocodb/nocodb
DarkPhoenix2704
2 months ago
6 changed files with 70 additions and 33 deletions
@ -1,15 +1,30 @@ |
|||||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||||
const { loadGithubFeed, githubFeed } = useProductFeed() |
const { loadGithubFeed, githubFeed } = useProductFeed() |
||||||
|
|
||||||
onMounted(async () => { |
const scrollContainer = ref<HTMLElement>() |
||||||
await loadGithubFeed() |
|
||||||
}) |
const { isLoading } = useInfiniteScroll( |
||||||
|
scrollContainer, |
||||||
|
async () => { |
||||||
|
if (isLoading.value) return |
||||||
|
await loadGithubFeed(true) |
||||||
|
}, |
||||||
|
{ distance: 10 }, |
||||||
|
) |
||||||
</script> |
</script> |
||||||
|
|
||||||
<template> |
<template> |
||||||
|
<div |
||||||
|
ref="scrollContainer" |
||||||
|
:style="{ |
||||||
|
height: 'calc(100dvh - var(--toolbar-height) - 3rem)', |
||||||
|
}" |
||||||
|
class="overflow-y-auto nc-scrollbar-md mx-auto w-full" |
||||||
|
> |
||||||
<div class="max-w-260 mx-auto"> |
<div class="max-w-260 mx-auto"> |
||||||
<FeedChangelogItem v-for="feed in githubFeed" :key="feed.id" :date="feed.published_at" :body="feed?.body" /> |
<FeedChangelogItem v-for="feed in githubFeed" :key="feed.id" :date="feed.published_at" :body="feed?.body" /> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<style scoped lang="scss"></style> |
<style scoped lang="scss"></style> |
||||||
|
Loading…
Reference in new issue