1,html
<el-table class="tb-edit" highlight-current-row :data="tableData" border style="width: 100%">
<template v-for="(col,index) in cols">
<el-table-column :prop="col.prop" :label="col.label"></el-table-column>
</template>
</el-table>
2,data
data(): {
return: {
cols:[
{prop: "327", label: "护士"},
{prop: "328", label: "护理员组长"},
{prop: "329", label: "护理员"},
{prop: "330", label: "输单员"}
],
tableData:[
{327: "24", 328: "20", 329: "18", 330: "2"},
{327: "22", 328: "20", 329: "18", 330: "2"},
{327: "22", 328: "20", 329: "18", 330: "2"},
{327: "51", 328: "21", 329: "20", 330: "6"},
{327: "21", 328: "20", 329: "18", 330: "2"},
]
}
}
网友评论