formatter 用来格式化内容 Function(row, column, cellValue, index)
<el-table-column prop="teacherSex" label="性别" :formatter="formatterSex"> </el-table-column>
methods: {
*格式化性别 */
formatterSex(row, column) {
return row.teacherSex == 1 ? "男" : "女";
},
}