diff --git a/src/views/comment/CommentList.vue b/src/views/comment/CommentList.vue index 5021acf1..67697327 100644 --- a/src/views/comment/CommentList.vue +++ b/src/views/comment/CommentList.vue @@ -61,6 +61,18 @@ + 会话模式 + 列表模式
{ - this.comments = response.data.data.content - this.pagination.total = response.data.data.total - this.commentsLoading = false - }) + if (this.tableListMode) { + commentApi.query(this.queryParam).then(response => { + this.comments = response.data.data.content + this.pagination.total = response.data.data.total + this.commentsLoading = false + }) + }else{ + // TODO tree view + } }, handleEditComment(id) { this.$message.success('编辑') @@ -219,6 +236,10 @@ export default { this.queryParam.keyword = null this.queryParam.status = null this.loadComments() + }, + toggleTableMode() { + this.tableListMode = !this.tableListMode + this.loadComments() } } }