Authored by 陈峰

fix commit repeat

... ... @@ -76,7 +76,7 @@ export default {
if (this.page === 1) {
this.commentList = comments;
this.$nextTick(() => {
this.$emit('on-page-ready');
this.$emit('on-page-ready', {success: true});
});
} else {
this.commentList = this.commentList.concat(comments);
... ... @@ -97,6 +97,7 @@ export default {
type: 'warn',
time: 1000
}).show();
this.$emit('on-page-ready', {success: false});
}
return result;
},
... ...
... ... @@ -36,8 +36,8 @@ export default {
onPageChange({size}) {
this.size = size;
},
onPageReady() {
this.$emit('on-page-ready');
onPageReady(params) {
this.$emit('on-page-ready', params);
},
onClose() {
this.$emit('on-close');
... ...
... ... @@ -73,6 +73,7 @@ export default {
articleId: 0,
articleIndex: -1,
showCommentAction: false,
showCommentActioning: false,
showArticleDetailAction: false,
inx: 0,
scrollTop: 0,
... ... @@ -112,12 +113,21 @@ export default {
this.articleIndex = index;
this.showCommentAction = true;
this.$nextTick(() => {
if (this.showCommentActioning) {
return;
}
this.showCommentActioning = true;
this.$refs.comment.init();
});
},
onPageReady() {
if (this.showCommentAction) {
onPageReady({success}) {
if (success && this.showCommentAction) {
this.$refs.commentAction.show();
setTimeout(() => {
this.showCommentActioning = false;
}, 300);
} else {
this.showCommentActioning = false;
}
},
onClose() {
... ...