效果图:

elementUI pagination 实现在同一页面下多个分页

主要代码:

<div v-for="(comment,index) in commentData">

....

<el-pagination
                                        @current-change="handleCurrentChangeM($event,index)"
                                        :page-size="comment.pageSize"
                                        :total="comment.total"
                                        :current-page="comment.currentPage"
                                        :background="true"
                                        :small="true"
                                        layout="total,prev, pager, next">
                                    </el-pagination>

.......

handleCurrentChangeM(val,index){
                this.currentTabData[index].currentPage = val;
                this.answerCommentIndex = index;
                this.refreshCommentReply();
            },

相关文章: