mirror of https://github.com/halo-dev/halo
fix: comments cannot be replied to.
parent
f2943e2c49
commit
7bf71eb919
|
@ -156,13 +156,7 @@ export default {
|
|||
this.selectedComment = comment
|
||||
this.replyCommentVisible = true
|
||||
this.replyComment.parentId = comment.id
|
||||
if (this.type === 'posts') {
|
||||
this.replyComment.postId = comment.post.id
|
||||
} else if (this.type === 'sheets') {
|
||||
this.replyComment.postId = comment.sheet.id
|
||||
} else {
|
||||
this.replyComment.postId = comment.journal.id
|
||||
}
|
||||
this.replyComment.postId = this.id
|
||||
},
|
||||
handleCreateClick() {
|
||||
if (!this.replyComment.content) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<span
|
||||
v-else-if="comment.status === 'PUBLISHED'"
|
||||
@click="handleReplyClick"
|
||||
@click="handleReplyClick(comment)"
|
||||
>回复</span>
|
||||
|
||||
<a-popconfirm
|
||||
|
@ -86,8 +86,8 @@
|
|||
v-for="(child, index) in comment.children"
|
||||
:key="index"
|
||||
:comment="child"
|
||||
@reply="handleReplyClick"
|
||||
@delete="handleDeleteClick"
|
||||
@reply="handleReplyClick(child)"
|
||||
@delete="handleDeleteClick(child)"
|
||||
@editStatus="handleEditStatusClick"
|
||||
/>
|
||||
</template>
|
||||
|
@ -114,8 +114,8 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
handleReplyClick() {
|
||||
this.$emit('reply', this.comment)
|
||||
handleReplyClick(comment) {
|
||||
this.$emit('reply', comment)
|
||||
},
|
||||
handleEditStatusClick(comment, status) {
|
||||
this.$emit('editStatus', comment, status)
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
<a-form-item
|
||||
class="animated fadeInUp"
|
||||
:style="{'animation-delay': '0.1s'}"
|
||||
extra="* 如果 halo admin 不是独立部署,请不要更改此 API"
|
||||
extra="* 如果 Admin 不是独立部署,请不要更改此 API"
|
||||
>
|
||||
<a-input
|
||||
placeholder="API 地址"
|
||||
|
|
Loading…
Reference in New Issue