<el-table :data="columnList" :height="400" :loading="tableLoading" stripe border highlight-current-row>
<el-table-column v-for="(item, index) in columnData" :key="index" :prop="item.prop" :label="item.label" :width="item.width" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{scope.row[item.prop]}}</span>
</template>
</el-table-column>
</el-table>
this.columnData = [
{label:'员工名称', prop:'userName',width:120},
{ label:'分配金额', prop:'allotMoney',width:120},
{label:'部门', prop:'deptPath',width:'auto'},
]
columnList:[]