<el-table @sort-change="sortChangeJF" v-show="tableDatatableBodylength> 0" :data="tablePageData" :pagination="pagination" border style="width: 100%" max-height="440">
<el-table-column prop="fanId" type="selection" align="center" width="55"></el-table-column>
<el-table-column sortable='custom' fixed style="bottom:7px;" prop="产品型号" align="left" label="产品型号" width="150"></el-table-column>
<el-table-column prop="功率曲线及推力系数" label="功率曲线及推力系数" align="center" width="180" v-if="showEcharts">
<template slot-scope="scope">
<el-button size="mini" type="primary" plain @click="btnChartDown(scoperow)">查看图表</el-button>
</template>
</el-table-column>
<el-table-column v-if="showPT" sortable='custom' prop="平台" align="center" label="平台"></el-table-column>
<el-table-column v-if="showDWSFMJ" width="180"
sortable='custom' prop="单位扫风面积成本指数" align="center" label="单位扫风面积成本指数"></el-table-column>
</el-table>
//分页
pagination: {
currentPage: 1,
pageSize: 8
},
sortChangeJF(val){
thissortChange(val, thistableData,thispagination)
},
sortChange(val,table,pagination){
let {column, prop, order} = val
if(!order){
tabletableBody = thiscopyArr(tableallData)
paginationcurrentPage = 1
return
}
let flag = order == "ascending" 1 : -1
if("平台" == prop || "单位扫风面积成本指数" == prop || "轮毂高度" == prop){
tabletableBodysort(function(a,b){
return flag (a[prop] - b[prop])
})
}else if("单机容量" == prop){
tabletableBodysort(function(a,b){
return flag (parseFloat(a[prop]) - parseFloat(b[prop]))
})
}else{
tabletableBodysort(function(a,b){
return flag (a[prop] > b[prop])
})
}
paginationcurrentPage = 1
},
以上就是关于vue 导出多级表头table 数据到excel全部的内容,包括:vue 导出多级表头table 数据到excel、vue 怎样获取表格的行号、vue里面处理表格排序的问题等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)