<>动态表格
* 在前端开发中,表格是不可或缺的一环,现在就浅讲下动态表格的实现, <template> <div> <el-table :data=
"tableData" border stripe style="width: 100%" id="table" > <el-table-column type
="index" label="序号" width="100" show-overflow-tooltip ></el-table-column> <el-
table-column v-for="item in tableHeader" :label="item.title" :key="item.name" :
prop="item.name" :show-overflow-tooltip="true" > </el-table-column> </el-table>
</div> </template> <script> export default { data() { return { tableData:[ {name
:"怨种",age:"24"}, {name:"老六",age:"28"}, ], tableHeader: [ {name:"name",title:"姓名"
}, {name:"age",title:"年龄"},], } } } </script>