"description": "权限01","description": "权限02","description": "权限03","description": "权限04","description": "权限05","name": "姓名01","name": "姓名02","name": "姓名03","name": "姓名04","name": "姓名05",label="序号"_el-">
赞
踩
有时候我们需要通过数据库来动态控制表格的列,这样做的好处就是系统中如果有太多的表格项的话,直接这套代码就能通用了,其他的数据库里控制就行,不要太方便了,特别是一些ERP或者供应链的表格,动不动就是几十上百个字段,这时候不要太轻松了,废话不多说,直接上代码:
<template>
<el-table
:data="Data"
style="width: 100%"
@cell-click="tableClick"
>
<el-table-column
prop="address"
label="序号"
type="index"
>
</el-table-column>
<el-table-column
v-for="(info) in rightHeader"
:key="info.key"
:label="info.label"
:prop="info.key"
:show-overflow-tooltip="true"
align="center"
>
<template slot-scope="scope">
<span v-if="scope.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。