Skip to content
This repository was archived by the owner on Jan 2, 2022. It is now read-only.

Commit 501896e

Browse files
committed
initial class atTop
1 parent 51cf988 commit 501896e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-scroll-check",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"scripts": {
55
"serve": "vue-cli-service serve",
66
"build": "vue-cli-service build",

src/App.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<div class="container">
88
<div class="left">
99
<pre v-highlightjs><code class="html">&lt;v-scroll-check
10+
containerClass="my-container"
1011
scrollAreaClass="list"
1112
:threshold="100"
1213
@onBottomReach="onBottomReach"
@@ -57,7 +58,7 @@ export default {
5758
border-radius: 10px;
5859
background: #fff;
5960
padding: 8px;
60-
/* Don't forget that! The scrollAreaClass must have a height and overflow: auto or scroll. */
61+
/* Don't forget that! The scrollAreaClass must be scrollable. */
6162
height: 500px;
6263
overflow: auto;
6364
}
@@ -72,10 +73,11 @@ export default {
7273
<div class="right">
7374
<pre
7475
class="demo-pre"
75-
><code><span style="color:#8a31b9">&lt;div</span> <span style="color:#da103f">class</span>=<span style="color:#1d8991">"{{ atTop }}{{ atBottom }}{{ inMiddle }}"</span><span style="color:#8a31b9">></span>
76+
><code><span style="color:#8a31b9">&lt;div</span> <span style="color:#da103f">class</span>=<span style="color:#1d8991">"my-container {{ atTop }}{{ atBottom }}{{ inMiddle }}"</span><span style="color:#8a31b9">></span>
7677
<span style="color:#8a31b9">&lt;div</span> <span style="color:#da103f">class</span>=<span style="color:#1d8991">"list"</span><span style="color:#8a31b9">></span>...<span style="color:#8a31b9">&lt;/div></span>
7778
<span style="color:#8a31b9">&lt;/div></span></code></pre>
7879
<v-scroll-check
80+
containerClass="my-container"
7981
scrollAreaClass="list"
8082
:threshold="100"
8183
@onBottomReach="onBottomReach"
@@ -102,7 +104,7 @@ export default {
102104
},
103105
data() {
104106
return {
105-
atTop: '',
107+
atTop: 'atTop',
106108
atBottom: '',
107109
inMiddle: ''
108110
}

src/components/ScrollCheck.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
data() {
3131
return {
3232
hasScrolledToBottom: false,
33-
isAtTop: false,
33+
isAtTop: true,
3434
isAtBottom: false,
3535
isInMiddle: false,
3636
isInitialTop: true

0 commit comments

Comments
 (0)