Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-community-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
6 years ago
Commit
67c04690e9b49e0be3781433ad6d97c22df03bdb
1 parent
7223866e
inited
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
apps/components/layouts/recycle-scroll-reveal.vue
apps/store/article/actions.js
apps/components/layouts/recycle-scroll-reveal.vue
View file @
67c0469
...
...
@@ -110,6 +110,7 @@ export default {
if (oldList.length < 2) {
this._updateList();
this.$emit('on-inited', this._getCurrentItems());
}
});
}
...
...
@@ -319,11 +320,7 @@ export default {
this.updateCurrentItems(scrollTop);
},
onScroll() {
const scrollTop = this.$el.scrollTop;
this.updateList();
_getCurrentItems(scrollTop = 0) {
let currents = [];
if (scrollTop > (this.$refs.eternal.offsetHeight - document.body.clientHeight / 2)) {
...
...
@@ -338,7 +335,14 @@ export default {
}
}
this.$emit('scroll', {scrollTop, items: currents});
return currents;
},
onScroll() {
const scrollTop = this.$el.scrollTop;
this.updateList();
this.$emit('scroll', {scrollTop, items: this._getCurrentItems(scrollTop)});
},
},
components: {
...
...
apps/store/article/actions.js
View file @
67c0469
...
...
@@ -270,6 +270,7 @@ export default {
const
result
=
await
this
.
$api
.
post
(
'/api/grass/topicRelatedArticles'
,
{
topicId
,
page
,
limit
:
6
,
lastedTime
:
state
.
articleLastedTimeByTopic
||
void
0
});
...
...
Please
register
or
login
to post a comment