pull/3445/head
ruibaby 2019-11-24 22:40:12 +08:00
parent 420015a38a
commit 2e5f0e1443
2 changed files with 14 additions and 2 deletions

View File

@ -234,6 +234,7 @@
v-else v-else
:rowKey="comment => comment.id" :rowKey="comment => comment.id"
:rowSelection="{ :rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectionChange, onChange: onSelectionChange,
getCheckboxProps: getCheckboxProps getCheckboxProps: getCheckboxProps
}" }"
@ -571,6 +572,7 @@ export default {
}) })
}, },
handleQuery() { handleQuery() {
this.handleClearRowKeys()
this.handlePaginationChange(1, this.pagination.size) this.handlePaginationChange(1, this.pagination.size)
}, },
handleEditStatusClick(commentId, status) { handleEditStatusClick(commentId, status) {
@ -624,6 +626,7 @@ export default {
handleResetParam() { handleResetParam() {
this.queryParam.keyword = null this.queryParam.keyword = null
this.queryParam.status = null this.queryParam.status = null
this.handleClearRowKeys()
this.handlePaginationChange(1, this.pagination.size) this.handlePaginationChange(1, this.pagination.size)
}, },
handlePublishMore() { handlePublishMore() {
@ -668,6 +671,9 @@ export default {
}) })
} }
}, },
handleClearRowKeys() {
this.selectedRowKeys = []
},
onReplyClose() { onReplyClose() {
this.replyComment = {} this.replyComment = {}
this.selectComment = {} this.selectComment = {}
@ -680,7 +686,7 @@ export default {
getCheckboxProps(comment) { getCheckboxProps(comment) {
return { return {
props: { props: {
disabled: comment.status === 'RECYCLE', disabled: this.queryParam.status == null || this.queryParam.status === '',
name: comment.author name: comment.author
} }
} }

View File

@ -292,6 +292,7 @@
v-else v-else
:rowKey="post => post.id" :rowKey="post => post.id"
:rowSelection="{ :rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectionChange, onChange: onSelectionChange,
getCheckboxProps: getCheckboxProps getCheckboxProps: getCheckboxProps
}" }"
@ -665,7 +666,7 @@ export default {
getCheckboxProps(post) { getCheckboxProps(post) {
return { return {
props: { props: {
disabled: post.status === 'RECYCLE', disabled: this.queryParam.status == null || this.queryParam.status === '',
name: post.title name: post.title
} }
} }
@ -680,9 +681,11 @@ export default {
this.queryParam.keyword = null this.queryParam.keyword = null
this.queryParam.categoryId = null this.queryParam.categoryId = null
this.queryParam.status = null this.queryParam.status = null
this.handleClearRowKeys()
this.handlePaginationChange(1, this.pagination.size) this.handlePaginationChange(1, this.pagination.size)
}, },
handleQuery() { handleQuery() {
this.handleClearRowKeys()
this.handlePaginationChange(1, this.pagination.size) this.handlePaginationChange(1, this.pagination.size)
}, },
handleEditStatusClick(postId, status) { handleEditStatusClick(postId, status) {
@ -758,6 +761,9 @@ export default {
window.open(response.data, '_blank') window.open(response.data, '_blank')
}) })
}, },
handleClearRowKeys() {
this.selectedRowKeys = []
},
// //
onPostSettingsClose() { onPostSettingsClose() {
this.postSettingVisible = false this.postSettingVisible = false