类似性别(0、1)判断的table列表数据渲染
1、
<el-table-column prop="gender" align="center" label="性别" width="100">
<template slot-scope="scope">{{ scope.row.gender === 0 ? '男' : '女' }}</template>
</el-table-column>
2、
<el-table-column label="状态">
<template slot-scope="scope">
<div v-if="scope.row.userState == 0">
<el-switch v-model="value0" disabled></el-switch>
</div>
<div v-else="scope.row.userState == 1">
<el-switch v-model="value1" disabled></el-switch>
</div>
</template>
</el-table-column>