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

Reformats code

This commit is contained in:
Amir Raminfar
2020-03-30 16:20:23 -07:00
parent 564d089172
commit 024dd22896
15 changed files with 81 additions and 84 deletions

View File

@@ -7,16 +7,16 @@ export default {
name: "InfiniteLoader",
data() {
return {
isLoading: false
isLoading: false,
};
},
props: {
onLoadMore: Function,
enabled: Boolean
enabled: Boolean,
},
mounted() {
const intersectionObserver = new IntersectionObserver(
async entries => {
async (entries) => {
if (entries[0].intersectionRatio <= 0) return;
if (this.onLoadMore && this.enabled) {
const scrollingParent = this.$el.closest("[data-scrolling]") || document.documentElement;
@@ -31,7 +31,7 @@ export default {
);
intersectionObserver.observe(this.$refs.observer);
}
},
};
</script>
<style scoped lang="scss"></style>