el-table-column循环生成,循环中使用v-if,会出现数据显示错乱问题。
解决方法:
<el-table-column v-for="(item,index) in configTitleList" :prop="item.key" :key="index" :label="item.value"
>
<template slot-scope="scope">
<span v-if="item.key != 'statusName'">{{scope.row[item.key]}}</span>
<span v-else @click=“click()”>
{{scope.row.statusName}}
</span>
</template>
</el-table-column>