To judge men and women, the only fields passed from the back end are 0 and 1. Ant-design-vue provides the option to convert the number type in the table into a text type. The code is as follows:
columns : [
{
title: "姓名",
dataIndex: "XM",
key: "XM",
},
{
title: "性别",
dataIndex: "SEX",
key: "SEX",
customRender:function (text){
if(text=='0'){
return "男";
}else{
return "女";
}
}
},
]