...
|
...
|
@@ -36,7 +36,7 @@ |
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {debounce} from 'lodash';
|
|
|
import {debounce, throttle} from 'lodash';
|
|
|
import ArticleItem from './article-item';
|
|
|
import ArticleActionSheet from '../detail/article-action-sheet';
|
|
|
import {createNamespacedHelpers} from 'vuex';
|
...
|
...
|
@@ -61,6 +61,7 @@ export default { |
|
|
},
|
|
|
mounted() {
|
|
|
this.scrollPreLazy = debounce(this.changeItem.bind(this), 200);
|
|
|
this.scrollEvent = throttle(this.onDounceScroll.bind(this), 50);
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
...
|
...
|
@@ -121,7 +122,10 @@ export default { |
|
|
this.ASYNC_ARTICLE_COMMENT({articleId: this.articleId, type: this.type});
|
|
|
this.onResize(this.articleIndex);
|
|
|
},
|
|
|
onScroll({item, scrollTop}) {
|
|
|
onScroll(params) {
|
|
|
this.scrollEvent(params);
|
|
|
},
|
|
|
onDounceScroll({item, scrollTop}) {
|
|
|
this.scrollTop = scrollTop;
|
|
|
if (scrollTop === 0) {
|
|
|
this.currentAuthor.opacity = 1;
|
...
|
...
|
|