<template><div class= "Echarts" ><el-table:data= "dataList" style= "width:100%" >< el-table-columnprop= "Date" label= "dates" width= "></el-table-column><el-table-columnprop=" "Name" label = "Name" width= "></el-table-column><el-table-columnprop=" Address "label=" ></ El-table-column></el-table><el-pagination@size-change= "Handlesizechange"@current-change= "Handlecurrentchange": current-page.sync= "Pagation.currentpage":p age-size= "Pagation.pagesize"layout= "Total, prev, pager, Next": total= "Pagation.total" ></el-pagination></div></template><script>export Default {data: () = ({tabledata: [], Pagation: {pagesize:10,total:0,currentpage:1},listarr: []}), created () {This.init ()},computed:{dataList () {Const DATACODELIST = This.tabledataConst PAGESIZE = this.pagation.pagesizeConst CURRENTPAGE = this.pagation.currentPagereturn Datacodelist.slice ((currentPage-1) *pagesize,pagesize*currentpage)}},Methods: {init () {Let arr = []const num = 26for (var i= 0;i<num; i++) {var obj = {date: ' 2016-05-02 ', Name: ' King Tiger ' + num, Address: ' 1518, Jinshajiang Road, Putuo District, Shanghai '}arr.push (obj)}this.pagation.total = Numthis.tabledata = Arr},handlesizechange (size) { This.pagation.pagesize = Size},handlecurrentchange (currentpage) {this.pagation.currentPage = currentpage}}};</ Script><style Scoped>.echarts{width:100%;height:400px;margin:auto;text-align:center;} </style>
Front Desk data for paging