element-ui 表格列动态展示,排序错乱问题
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
免费下载资源
·
<el-table :data="tableData" border stripe style="width: 100%;background:white;" >
<el-table-column key="1" type="index" label="序号" align="center" width="80" :resizable='false'></el-table-column>
<el-table-column key="2" prop="orgName" label="单位" align="center" :resizable='false'></el-table-column>
<el-table-column key="3" prop="personName" label="姓名" align="center" :resizable='false'></el-table-column>
<el-table-column key="4" v-if="staticsTmp.ruleAttendanceDuration" prop="ruleAttendanceDuration" label="外勤(小时)" align="center" :resizable='false'></el-table-column>
<el-table-column key="5" v-if="staticsTmp.innerDutyDuration" prop="innerDutyDuration" label="内勤(小时)" align="center" :resizable='false'></el-table-column>
<el-table-column key="6" v-if="staticsTmp.leaveCount" prop="leaveCount" label="请假(小时)" align="center" :resizable='false'></el-table-column>
<el-table-column key="7" v-if="staticsTmp.changeCount" prop="changeCount" label="调休(小时)" align="center" :resizable='false'></el-table-column>
<el-table-column key="8" v-if="staticsTmp.lendCount" prop="lendCount" label="借出(小时)" align="center" :resizable='false'></el-table-column>
</el-table>
加上key='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 个月前
更多推荐
已为社区贡献1条内容
所有评论(0)