mirror of https://github.com/halo-dev/halo-admin
Fixed comment search error.
parent
c86b450d9b
commit
510daf522c
|
@ -37,7 +37,7 @@
|
||||||
<span class="table-page-search-submitButtons">
|
<span class="table-page-search-submitButtons">
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="loadComments"
|
@click="loadComments(isSearch)"
|
||||||
>查询</a-button>
|
>查询</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
style="margin-left: 8px;"
|
style="margin-left: 8px;"
|
||||||
|
@ -204,12 +204,15 @@ export default {
|
||||||
this.loadComments()
|
this.loadComments()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadComments() {
|
loadComments(isSearch) {
|
||||||
this.commentsLoading = true
|
this.commentsLoading = true
|
||||||
// Set from pagination
|
// Set from pagination
|
||||||
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 (isSearch) {
|
||||||
|
this.queryParam.page = 0
|
||||||
|
}
|
||||||
if (this.tableListMode) {
|
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
|
||||||
|
|
Loading…
Reference in New Issue