关键代码
<el-table ref="multipleTable" :data="dataList.length===0 ? []: dataList.slice( (listQuery.pages-1)*listQuery.rows , listQuery.pages*listQuery.rows )" border highlight-current-row stripe :height="tableHeight" element-loading-text="拼命加载中请稍后。。。" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" @current-change="checkBox">
<el-table-column prop="TASK_SQL_ID" label="TASK_SQL_ID" align="center" />
</el-table>
参数说明:
dataList 是后端返回过来,前端绑定到表格上的数组,pages 是当前页码,rows 是每一页的条数