From e8fbc3f2af6082d5783c17696d02fe71c9e1fb95 Mon Sep 17 00:00:00 2001 From: x ronger Date: Tue, 29 Sep 2020 18:26:08 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E8=AF=84=E8=AE=BA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=96=87=E7=AB=A0=E4=BD=9C=E8=80=85?= =?UTF-8?q?=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/common/comment/main.vue | 31 +++++++++++++++++++++++------- pages/article/_article_id.vue | 2 +- 2 files changed, 25 insertions(+), 8 deletions(-) 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">