Authored by yyq

Merge branch 'feature/0530' into release/6.9.5

... ... @@ -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: {
... ...
... ... @@ -302,6 +302,7 @@ export default {
const result = await this.$api.post('/api/grass/topicRelatedArticles', {
topicId,
page,
limit: 6,
lastedTime: state.articleLastedTimeByTopic || void 0
});
... ...