diff --git a/src/api/comment.js b/src/api/comment.js index 6a1379fa..60a40351 100644 --- a/src/api/comment.js +++ b/src/api/comment.js @@ -23,6 +23,14 @@ commentApi.queryComment = (target, params) => { }) } +commentApi.commentTree = (target, id, params) => { + return service({ + url: `${baseUrl}/${target}/comments/${id}/tree_view`, + params: params, + method: 'get' + }) +} + commentApi.updateStatus = (target, commentId, status) => { return service({ url: `${baseUrl}/${target}/comments/${commentId}/status/${status}`, diff --git a/src/components/global.less b/src/components/global.less index d3e89060..24c61ca0 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -592,8 +592,6 @@ body { } .ant-comment-inner { - padding: 0 !important; - .ant-comment-content { .ant-comment-content-detail { p { diff --git a/src/views/comment/components/TargetCommentDrawer.vue b/src/views/comment/components/TargetCommentDrawer.vue new file mode 100644 index 00000000..105bbdb1 --- /dev/null +++ b/src/views/comment/components/TargetCommentDrawer.vue @@ -0,0 +1,129 @@ + + diff --git a/src/views/comment/components/TargetCommentTree.vue b/src/views/comment/components/TargetCommentTree.vue new file mode 100644 index 00000000..3b0e6c88 --- /dev/null +++ b/src/views/comment/components/TargetCommentTree.vue @@ -0,0 +1,64 @@ + + diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index dfb9e4ff..24aaa34a 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -27,7 +27,7 @@ - {{ item.visits }} - + {{ item.commentCount }} @@ -390,10 +390,12 @@ - + +