| | |
| | | <replyBox ref="commentBoxId" v-bind="$attrs"></replyBox> |
| | | <a-modal v-model="visible" :title="replyTaget" :footer="null" |
| | | :bodyStyle="{'overflow':'overlay','maxHeight': '550px','scrollbarWidth': 'none'}"> |
| | | <replyBox ref="replyBoxId" v-bind="$attrs"></replyBox> |
| | | <replyBox ref="replyBoxId" v-bind="$attrs" @sendMsg="sendMsg()"></replyBox> |
| | | </a-modal> |
| | | <div class="mySecret" v-if="commentListData.length==0"> |
| | | <div class="mySecret" style="max-height:350px ;" v-if="commentListData.length==0"> |
| | | <p>空空如也..</p> |
| | | </div> |
| | | <div v-for="temp in commentListData" class="commentList"> |
| | |
| | | } from '../../api/blogArticleComment.js' |
| | | |
| | | export default { |
| | | props: ["articleId"], |
| | | components: { |
| | | replyBox |
| | | }, |
| | | beforeMount() { |
| | | queryBlogCommentList({ |
| | | pageNo: this.page.current, |
| | | pageSize: this.page.pageSize, |
| | | articleId: this.$attrs.acticleId |
| | | }).then((res) => { |
| | | this.page.total = Number(res.data.total) |
| | | this.page.pageSize = Number(res.data.size); |
| | | this.commentListData = res.data.records; |
| | | return res |
| | | }) |
| | | }, |
| | | methods: { |
| | | onChange(current) { |
| | | this.page.current = current; |
| | | updateCommentList(articleId) { |
| | | queryBlogCommentList({ |
| | | pageNo: this.page.current, |
| | | pageSize: this.page.pageSize, |
| | | articleId: this.$attrs.articleId |
| | | articleId: articleId |
| | | }).then((res) => { |
| | | this.page.total = Number(res.data.total) |
| | | this.page.pageSize = Number(res.data.size); |
| | | this.commentListData = res.data.records; |
| | | }) |
| | | }, |
| | | sendMsg() { |
| | | this.visible = false; |
| | | this.$message.info("列表刷新中..") |
| | | setTimeout(() => { |
| | | this.updateCommentList(this.$attrs.articleId); |
| | | }, 1000); |
| | | }, |
| | | onChange(current) { |
| | | this.page.current = current; |
| | | this.updateCommentList(); |
| | | }, |
| | | loadMore(temp) { |
| | | temp.isHasNext = 0; |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // articleId: null, |
| | | isAllowedComment: true, |
| | | page: { |
| | | size: "small", |