1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

Changes scroll progress to behave differently when fetching scroll back content. (#640)

This commit is contained in:
Amir Raminfar
2020-08-19 12:47:28 -07:00
committed by GitHub
parent 0c2e2430fd
commit b148367618
10 changed files with 158 additions and 56 deletions

View File

@@ -5,9 +5,9 @@
</header>
<main ref="content" :data-scrolling="scrollable">
<div class="is-scrollbar-progress is-hidden-mobile">
<scroll-progress v-show="paused"></scroll-progress>
<scroll-progress v-show="paused" :indeterminate="loading" :auto-hide="!loading"></scroll-progress>
</div>
<slot></slot>
<slot :setLoading="setLoading"></slot>
<div ref="scrollObserver" class="is-scroll-observer"></div>
</main>
@@ -41,6 +41,7 @@ export default {
return {
paused: false,
hasMore: false,
loading: false,
};
},
mounted() {
@@ -73,6 +74,9 @@ export default {
this.$refs.scrollObserver.scrollIntoView({ behavior });
this.hasMore = false;
},
setLoading(loading) {
this.loading = loading;
},
},
};
</script>