<template>
<el-table-column show-overflow-tooltip :min-width="column.minwidth || 150" :fixed="false" :prop="column.prop" :label="column.showName">
<template slot="header">
<div class="row tablepheader justcenter aicenter" @click.stop.prevent="headerclick(column.prop)">
<label>{{ column.showName }}</label>
</div>
</template>
<tablecolumn v-for="(ii, indexz) in column.children" :pprop="pprop + 1" :key="'zicol1' + pprop + indexz" :column="ii" @headerclick="headerclick" @commitfilter="commitfilter">
<!-- template 的slot-scope 从上面的slot 里面接收数据,然后在下发到slot 里 -->
<template slot="ddd" slot-scope="{ scope }"> <slot :scope="scope" :ditem="ii" name="ddd" /></template>
</tablecolumn>
<!-- slot-scope 是从上面拿数据, 两个: 是往下发数据 -->
<slot v-if="!column.children" slot-scope="scope" :scope="scope" name="ddd" :ditem="column" />
</el-table-column>
</template>
如果出现第二个问题,说明 你 template 下面不是直接是el-table-column 而是div 就会导致标题所说的问题