mirror of https://github.com/halo-dev/halo
Comment list mode.
parent
0d69ba6d38
commit
afd4b387fb
|
@ -61,6 +61,18 @@
|
||||||
<a-icon type="down" />
|
<a-icon type="down" />
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
icon="message"
|
||||||
|
v-if="tableListMode"
|
||||||
|
@click="toggleTableMode"
|
||||||
|
>会话模式</a-button>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
icon="ordered-list"
|
||||||
|
v-else
|
||||||
|
@click="toggleTableMode"
|
||||||
|
>列表模式</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:15px">
|
<div style="margin-top:15px">
|
||||||
<a-table
|
<a-table
|
||||||
|
@ -176,6 +188,7 @@ export default {
|
||||||
selectedRows: [],
|
selectedRows: [],
|
||||||
comments: [],
|
comments: [],
|
||||||
commentsLoading: false,
|
commentsLoading: false,
|
||||||
|
tableListMode: true,
|
||||||
commentStatus: commentApi.commentStatus
|
commentStatus: commentApi.commentStatus
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -197,11 +210,15 @@ export default {
|
||||||
this.queryParam.page = this.pagination.current - 1
|
this.queryParam.page = this.pagination.current - 1
|
||||||
this.queryParam.size = this.pagination.pageSize
|
this.queryParam.size = this.pagination.pageSize
|
||||||
this.queryParam.sort = this.pagination.sort
|
this.queryParam.sort = this.pagination.sort
|
||||||
|
if (this.tableListMode) {
|
||||||
commentApi.query(this.queryParam).then(response => {
|
commentApi.query(this.queryParam).then(response => {
|
||||||
this.comments = response.data.data.content
|
this.comments = response.data.data.content
|
||||||
this.pagination.total = response.data.data.total
|
this.pagination.total = response.data.data.total
|
||||||
this.commentsLoading = false
|
this.commentsLoading = false
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
// TODO tree view
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleEditComment(id) {
|
handleEditComment(id) {
|
||||||
this.$message.success('编辑')
|
this.$message.success('编辑')
|
||||||
|
@ -219,6 +236,10 @@ export default {
|
||||||
this.queryParam.keyword = null
|
this.queryParam.keyword = null
|
||||||
this.queryParam.status = null
|
this.queryParam.status = null
|
||||||
this.loadComments()
|
this.loadComments()
|
||||||
|
},
|
||||||
|
toggleTableMode() {
|
||||||
|
this.tableListMode = !this.tableListMode
|
||||||
|
this.loadComments()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue