el-table列中嵌套列


<el-table-column label="数学" 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>

在列表中再嵌套el-table-column就行了


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM