1.组件内容(我放到了base/commonTable/index.vue下)
index.vue
<template>
<el-table stripe :data="tableProps.tableData" :border="tableProps.border" class="c_el_table" :header-cell-style="getRowClass" @sort-change="sortchange">
<el-table-column :label="item.keyName" :min-width="item.width" v-for="(item,index) in tableProps.dictionary" :key="index" sortable="custom" >
<template slot-scope="scope">
<div>
<span class="item" :style="{color:item.color,cursor: item.cursor,height:item.height}" v-html="scope.row[item.key]"></span>
</div>
</template>
</el-table-column>
<el-table-column style="border:1px solid red;" :label="tableProps.operateTitle" :min-width="tableProps.operateWidth" v-if="tableProps.operateTitle != undefined" >
<template slot-scope="scope">
<span class="operate-table"
@click="handleDetails(scope.$index,subIndex ,scope.row)"
v-for="(subItem, subIndex) in tableProps.operate"