<el-table-column prop="userType" label="角色" width="180" :formatter="ifuserType"></el-table-column>

  

在el-table里直接加一个formatter,绑定一个方法

在methods中加入

ifuserType(val){
console.log(val.userType);

if(val.userType == '0'){
return "管理员"
}else if (val.userType == '1'){
return "财务"
}else{
return "楼长"
}
},

 

相关文章:

  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-04-13
  • 2021-09-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2022-02-01
  • 2021-05-29
  • 2022-12-23
相关资源
相似解决方案