Authored by yyq

fix topic

... ... @@ -89,6 +89,9 @@ export default {
activated() {
if (this.scrollTop && this.yoho.direction === 'back') {
this.$refs.scroll.$el.scrollTop = this.scrollTop;
} else {
this.updateHeadAnimateStep(0);
this.scrollTop = 0;
}
if (+this.$route.params.topicId !== this.topicId) {
... ... @@ -145,7 +148,7 @@ export default {
return this.topicName || this.topicSimpleInfo.topicName || '';
},
tabBlockSuctionTop() {
return this.scrollTop >= (this._topicHeaderHeight - this._headerHeight);
return this.scrollTop > (this._topicHeaderHeight - this._headerHeight);
},
headerBgOpacity() {
return this.headerAnimateStep / 100;
... ... @@ -188,13 +191,13 @@ export default {
this._topicHeaderHeight = this._topicHeaderHeight || this.$refs.topicBanner.$el.offsetHeight;
let step = Math.round((scrollTop - 4) / (this._topicHeaderHeight - this._headerHeight - 10) * 100);
if (step) {
this.headerAnimateStep = Math.max(Math.min(step, 100), 0);
this.SET_STATUS_BAR_COLOR({
color: this.headerAnimateStep > 55 ? 'black' : 'white'
});
}
this.headerAnimateStep = Math.max(Math.min(step, 100), 0);
this.SET_STATUS_BAR_COLOR({
color: this.headerAnimateStep > 55 ? 'black' : 'white'
});
console.log(this.headerAnimateStep);
},
onDounceScroll({items}) {
this.reportArticleShow(items);
... ...