Fixed pagination in BaseTable.vue

pull/38/head
lin-xin 2017-03-01 09:16:06 +08:00
parent 663d39aed8
commit bd7647007d
1 changed files with 5 additions and 7 deletions

View File

@ -32,7 +32,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="1" :page-size="10" layout="total, prev, pager, next" :total="100"> <el-pagination
layout="prev, pager, next"
:total="1000">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -73,14 +75,10 @@
return row.tag === value; return row.tag === value;
}, },
handleEdit(index, row) { handleEdit(index, row) {
console.log(index, row); this.$message('编辑第'+(index+1)+'行');
}, },
handleDelete(index, row) { handleDelete(index, row) {
console.log(index, row); this.$message.error('删除第'+(index+1)+'行');
},
handleCurrentChange(val) {
this.currentPage = val;
console.log(`当前页: ${val}`);
} }
} }
} }