Skip to content

Commit 06465ea

Browse files
author
Chris Hurlburt
committed
tweaks to examples
1 parent 80ea385 commit 06465ea

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

examples/src/components/pages/animation/Animation.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<section class="animation">
33
<Example-start
44
title="Animation Example"
5-
description="This example demonstrates integrating an animation library, nameley GreenSock,
5+
description="This example demonstrates integrating GreenSock with ScrollView
66
to animate content at different scroll locations."
77
></Example-start>
88

examples/src/components/pages/infinitescroll/InfiniteScroll.vue

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<ScrollImage v-for="i in items" :source="i.url" :key="i.id" />
1616
</template>
1717
</scroll-view>
18+
<h3 v-if="loading" class="loading">Loading...</h3>
1819

1920
</section>
2021
</template>
@@ -33,7 +34,8 @@ export default {
3334
data() {
3435
return {
3536
page: 1,
36-
items: []
37+
items: [],
38+
loading: false,
3739
}
3840
},
3941
watch: {
@@ -47,13 +49,27 @@ export default {
4749
},
4850
methods: {
4951
fetchMore() {
52+
this.loading = true
5053
axios.get(`https://jsonplaceholder.typicode.com/albums/${this.page}/photos`)
51-
.then(({ data }) => this.items = this.items.concat(data.slice(1, 6)))
52-
.catch(console.log)
54+
.then(({ data }) => {
55+
this.loading = false
56+
this.items = this.items.concat(data.slice(1, 6))
57+
})
58+
.catch(e => {
59+
this.loading = false
60+
console.log(e)
61+
})
5362
},
5463
},
5564
mounted () {
5665
$scrollview.onLastEntered = () => this.page++ // last component entered, increment the page
5766
}
5867
}
5968
</script>
69+
70+
<style scoped>
71+
.loading {
72+
text-align: center;
73+
}
74+
</style>
75+

examples/src/components/pages/scrollmarkers/ScrollMarkers.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929

3030
<p v-if="currentlyShowing === 'fifth'" class="scroll-section">
31-
You might also notice they markers dont trigger a change
31+
You might also notice the markers dont trigger a change
3232
of text until they're well into the viewport -- that's because
33-
of the scroll-view component's default offset of 200px (can be changed
33+
of the scroll-view's default offset of 200px (can be changed
3434
via props).
3535
</p>
3636

examples/src/components/pages/scrollspy/Scrollspy.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
<Example-start
1515
title="Scrollspy Navigation Example"
16-
description="This is an example demonstrating using scroll-view to build an advanced page navigation system.
16+
description="This is an example demonstrating using ScrollView to build an advanced page navigation system.
1717
As you scroll the page and sections come into view, the menu on the left with dynamically mark your location.
18-
You can also easily scroll to sections by clicking items in the navigation."
18+
You can also scroll to sections by clicking items in the navigation."
1919
></Example-start>
2020

2121
<template v-for="(section, i) in pageSections">

0 commit comments

Comments
 (0)