diff --git a/components/common/comment/main.vue b/components/common/comment/main.vue index dc2be20..57a0ad5 100644 --- a/components/common/comment/main.vue +++ b/components/common/comment/main.vue @@ -44,21 +44,31 @@ - {{ comment.commenter.userNickname }} - - 回复了 {{comment.commentOriginalAuthorNickname}} + {{ comment.commenter.userNickname }} + + 回复了 {{comment.commentOriginalAuthorNickname}} 查看原评论 + + 作者 + - {{ comment.commenter.userNickname }} - + + {{ comment.commenter.userNickname }} + + + + + 作者 + + @@ -107,6 +117,10 @@ type: Object, default: false }, + authorId: { + type: Number, + default: false + }, avatar: { type: String, default: '' @@ -335,6 +349,9 @@ } else { ele.style.display = 'none'; } + }, + isAuthor(commentAuthorId) { + return this.authorId === commentAuthorId; } }, async mounted() { diff --git a/pages/article/_article_id.vue b/pages/article/_article_id.vue index 5e7d49d..62dd69a 100644 --- a/pages/article/_article_id.vue +++ b/pages/article/_article_id.vue @@ -76,7 +76,7 @@ + :post-id="routeArticleId" :authorId="article.articleAuthorId">