call me

使用el-table的type=index有时不显示序号

问题描述:el-table中通过type=index来显示序号。发现有时候序号不能正常显示

分析:因为el-table使用v-if控制显示

问题解决:type=index换一种写法

<el-table-column label="序号" width="50" align="center">
    <template slot-scope="scope">{{scope.$index+1}}</template>
</el-table-column>

 

posted on 2022-05-12 10:14  黑松沙土  阅读(2389)  评论(0)    收藏  举报

导航