直接上代码
子组件代码
<template>
<div>
<el-table
ref="dataTable"
:stripe="stripe"
:show-overflow-tooltip="tooltip"
:header-cell-style="headerStyle"
:border="isBorder"
:data="tableData"
style="width: 100%"
>
<template v-for="(item, idx) in tableColumn">
<!-- columnType 是否开启插槽 -->
<el-table-column
v-if="item.columnType == 'slot'"
:key="idx"
:prop="item.prop"
:label="item.label"
:width="item.width"
:align="align"
>
<template slot-scope="{ row }">
<slot :name="item.slotName" :data="row" />
</template>
&l