上代码:

<el-table
   :data="tableData"
    height //表头固定
    style="width: 100%">
        <el-table-column :label=title[key] v-for="(item,key) in title" :key="key">
          <el-table-column
            label="合格"
            class-name="normal-color">
            <template slot-scope="scope">
              {{scope.row[key*2]}}
            </template>
          </el-table-column>
          <el-table-column
            prop="name"
            label="不合格"
            class-name="red-color">
            <template slot-scope="scope">
              {{scope.row[(key*2+1)]}}
            </template>
          </el-table-column>
        </el-table-column>
</el-table>
export default {
   data() {
      return {
      	title:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月"],
      	tableData:[
      		name:'1',
      		list:[3,5,1,2,6,3,4,5,7,8,9,5,4,1,2,3,6,5,4,1]
      	]
      }
   },

酱酱~ 成啦~
在这里插入图片描述

GitHub 加速计划 / eleme / element
54.06 K
14.63 K
下载
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:3 个月前 )
c345bb45 7 个月前
a07f3a59 * Update transition.md * Update table.md * Update transition.md * Update table.md * Update transition.md * Update table.md * Update table.md * Update transition.md * Update popover.md 7 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐