本文共 1074 字,大约阅读时间需要 3 分钟。
1.添加分页
2.定义复制数据源
currentPage3: 1, cat_all_data: [{ }]
3.保存数据源
_this.cat_all_data = [].concat(date.data);//保存一份完整数据 _this.tableData = date.data.slice(0,18);
4.定义分页方法
handleSizeChange(val) { //console.log(`每页 ${ val} 条`); }, handleCurrentChange(val) { //console.log(`当前页: ${ val}`); var start_key = 18*(val-1); this.tableData = this.cat_all_data.slice(start_key,(18+start_key)); }
5.设定样式
.block_AAA { /deep/ .el-input__inner{ /*height: 2.5rem !important;*/ } /deep/ .el-pagination span:not([class*=suffix]){ font-size: 1.42rem !important; } } .Go{ display: inline-block; width:4.28rem; height:22px; border:1px solid rgba(78,132,255,1); border-radius:2px; font-size:1rem; color: #4E84FF; font-family:YaHei; /*line-height: 22px;*/ text-align: center; position: absolute; bottom: 0; right: 1.42rem; background-color: white; }
转载地址:http://ritj.baihongyu.com/