|
|
<template>
|
|
|
<div class="article-detail-notes">
|
|
|
<ArticleItemHeader v-if="share" :share="share" :data="authorData" :lazy="lazy" :more="false" @on-follow="onFollowAuthor"></ArticleItemHeader>
|
|
|
<LayoutHeader v-else style="visibility: hidden;"></LayoutHeader>
|
|
|
<LayoutHeader v-else ref="header" style="visibility: hidden;"></LayoutHeader>
|
|
|
|
|
|
<div v-if="data.empty" class="article-empty">
|
|
|
{{data.emptyTip || '文章不存在或文章被删除'}}
|
...
|
...
|
@@ -120,7 +120,7 @@ export default { |
|
|
this.$emit('on-follow', this.data, follow);
|
|
|
},
|
|
|
onPraise() {
|
|
|
this.$refs.footer.onPraise();
|
|
|
this.$emit('on-praise');
|
|
|
},
|
|
|
onChangeSlide({index}) {
|
|
|
this.slideIndex = index;
|
...
|
...
|
@@ -129,12 +129,8 @@ export default { |
|
|
this.$refs.commentList && this.$refs.commentList.addComment(comment);
|
|
|
},
|
|
|
toCommentList() {
|
|
|
if (this.articleState.commentCount) {
|
|
|
if (this.$refs.commentList && this.scrollTo) {
|
|
|
this.scrollTo({scrollTop: this.$refs.commentList.$el.offsetTop - this.$refs.header.$el.offsetHeight});
|
|
|
}
|
|
|
} else {
|
|
|
this.$refs.commentInput.$el.click();
|
|
|
if (this.$refs.commentList && this.scrollTo) {
|
|
|
this.scrollTo({scrollTop: this.$refs.commentList.$el.offsetTop - get(this.$refs, 'header.$el.offsetHeight', 0)});
|
|
|
}
|
|
|
},
|
|
|
onMore() {
|
...
|
...
|
|