element-ui的分页el-pagination的坑,
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
免费下载资源
·
1.所有的信息都必须的动态的
<el-pagination class="pull-right clearfix" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo" :page-sizes="pageSizesList" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalDataNumber"> </el-pagination>2.数据在data里面
pageNo: 1, pageSize: 10, pageSizesList: [10, 15, 20, 30, 50], tableData: [],//返回的结果集合 totalDataNumber: 0,//数据的总数,
3.这是重中之重,认真我的认证
this.$http({ method: 'POST', url: '/api/Acs/QueryAccessLog', data: requestData }).then(function (resp) { console.log(resp); if (resp.data.Data.Result.length > 0) { likeThis.tableData = resp.data.Data.Result; likeThis.totalDataNumber = resp.data.Data.Total; likeThis.listLoading=false; } else { likeThis.tableData = []; likeThis.totalDataNumber = 0; } })
//改变每页显示数量 handleSizeChange(val){ var likeThis=this; var pageSize = `${val}`; this.pageNo=1 this.pageSize= parseInt(pageSize); console.log('pageSize: '+pageSize); this.$nextTick(() => this.getAndDraw(1,pageSize,function (resp) { likeThis.totalDataNumber = resp.data.Data.Total; }) ) },
//改变页码 handleCurrentChange(val){ var pageSize=this.pageSize; // this.pageNo=pageNo; console.log('pageSize:'+this.pageSize) this.getAndDraw(parseInt(pageNo),parseInt(pageSize)); },
GitHub 加速计划 / eleme / element
54.06 K
14.63 K
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:3 个月前 )
c345bb45
7 个月前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 7 个月前
更多推荐
已为社区贡献4条内容
所有评论(0)