<el-table-column prop="studentSex" label="性别" :formatter="sex"></el-table-column>
然后就在vue的methods中写方法就可以了
methods: {
sex(row,index){
if(row.studentSex == 1){
return '男';
}else{
return '女';
}
}
}
如果这个文章对您有用,或者您希望持续关注,也可以扫描下方微信订阅号二维码: