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