<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 里面接收數(shù)據(jù),然后在下發(fā)到slot 里 -->
<template slot="ddd" slot-scope="{ scope }"> <slot :scope="scope" :ditem="ii" name="ddd" /></template>
</tablecolumn>
<!-- slot-scope 是從上面拿數(shù)據(jù), 兩個(gè): 是往下發(fā)數(shù)據(jù) -->
<slot v-if="!column.children" slot-scope="scope" :scope="scope" name="ddd" :ditem="column" />
</el-table-column>
</template>
如果出現(xiàn)第二個(gè)問題,說明 你 template 下面不是直接是el-table-column 而是div 就會導(dǎo)致標(biāo)題所說的問題