|
|
<template>
|
|
|
<div class="article-detail-notes">
|
|
|
<ArticleDetailHeader ref="header" :data="data" :step="100" :title-step="100">
|
|
|
<div class="title-main">
|
|
|
<div class="title-info" :style="`transform: translate3d(0, ${titleTranslateY}, 0)`">
|
|
|
<div v-if="!data.empty" class="title-main">
|
|
|
<div class="title-info" :style="`transform: translate3d(0, ${viewMoreArticles ? '-50%' : '0'}, 0)`">
|
|
|
<ArticleItemHeader class="title-info-author" :share="share" :data="authorData" :lazy="lazy" :more="false" @on-follow="onFollowAuthor"></ArticleItemHeader>
|
|
|
<div class="title-info-rec">{{listTitle}}</div>
|
|
|
</div>
|
...
|
...
|
@@ -10,7 +10,10 @@ |
|
|
</ArticleDetailHeader>
|
|
|
|
|
|
<LayoutHeader style="visibility: hidden;"></LayoutHeader>
|
|
|
<div class="article-context">
|
|
|
<div v-if="data.empty" class="article-empty">
|
|
|
{{data.emptyTip || '文章不存在或文章被删除'}}
|
|
|
</div>
|
|
|
<div v-else class="article-context">
|
|
|
<ArticleItemSlide :thumb="thumb" :share="share" :data="slideData" :slide-index="slideIndex" :lazy="lazy" @on-praise="onPraise" @change="onChangeSlide"></ArticleItemSlide>
|
|
|
<ProductGroup :article-id="data.articleId" :pos-id="0" :index="0" :thumb="thumb" v-if="productListData.length" :share="share" :data="productListData" :lazy="lazy"></ProductGroup>
|
|
|
|
...
|
...
|
@@ -23,12 +26,12 @@ |
|
|
</div>
|
|
|
<p class="publish-time">{{publishTime}}</p>
|
|
|
<ArticleDetailCommentList ref="commentList" v-if="data.commentCount" :article-id="data.articleId" :comment-count="data.commentCount"></ArticleDetailCommentList>
|
|
|
</div>
|
|
|
|
|
|
<div v-if="listTitle" class="rec-article-title">
|
|
|
<LayoutTitle>{{listTitle}}</LayoutTitle>
|
|
|
</div>
|
|
|
<div v-if="listTitle" class="rec-article-title">
|
|
|
<LayoutTitle>{{listTitle}}</LayoutTitle>
|
|
|
</div>
|
|
|
<ArticleDetailFooter ref="footer" class="detail-fixed-footer" v-bind="footerData" @on-comment-click="toCommentList">
|
|
|
<ArticleDetailFooter ref="footer" class="detail-fixed-footer" :class="{'disable': data.empty}" :style="`transform: translate3d(0, ${viewMoreArticles ? '100%' : '0'}, 0)`" v-bind="footerData" @on-comment-click="toCommentList">
|
|
|
<template v-slot:before>
|
|
|
<div class="footer-comment">
|
|
|
<CommentPlaceholder
|
...
|
...
|
@@ -98,14 +101,14 @@ export default { |
|
|
|
|
|
return Object.assign({...articleState}, {hasAttention: authorState.hasAttention});
|
|
|
},
|
|
|
titleTranslateY() {
|
|
|
viewMoreArticles() {
|
|
|
let scrollTop = this.scrollTop;
|
|
|
|
|
|
if (this.$refs && this.$refs.header) {
|
|
|
scrollTop += this.$refs.header.$el.offsetHeight;
|
|
|
return scrollTop > this.$el.offsetHeight ? '-50%' : 0;
|
|
|
return scrollTop > this.$el.offsetHeight;
|
|
|
} else {
|
|
|
return 0;
|
|
|
return false;
|
|
|
}
|
|
|
},
|
|
|
authorData() {
|
...
|
...
|
@@ -204,7 +207,7 @@ export default { |
|
|
|
|
|
.title-info {
|
|
|
height: 200%;
|
|
|
transition: all 300ms;
|
|
|
transition: all 200ms;
|
|
|
|
|
|
> * {
|
|
|
height: 50%;
|
...
|
...
|
@@ -229,6 +232,16 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
.article-empty {
|
|
|
height: 900px;
|
|
|
color: #ccc;
|
|
|
font-size: 28px;
|
|
|
background-color: #f0f0f0;
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.topics-wrap {
|
|
|
display: flex;
|
|
|
margin-top: 40px;
|
...
|
...
|
@@ -265,6 +278,7 @@ export default { |
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
z-index: 10;
|
|
|
transition: all 300ms;
|
|
|
|
|
|
.footer-comment {
|
|
|
width: 312px;
|
...
|
...
|
|