總結5——col-table使用v-if表頭發(fā)生寬度變化和其他變化
<el-table-column?label="數(shù)學"?align="center"??:key="Math.random()"??class="table-count">
??????????<template?v-if="task[0]">
????????????<el-table-column?v-for="(item,index)?in?task[0].calcresult"?:key="index"??align="center">
??????????????<template?slot="header">{{item.name}}</template>
??????????????<template?slot-scope="scope">{{scope.row.calcresult[index].value}}</template>
????????????</el-table-column>
??????????</template>
????????</el-table-column>
加一個:key="Math.random()"標識唯一值就行啦