vue中表格formatter格式化内容的用法

2021-08-16  本文已影响0人  上海_前端_求内推
<el-table-column prop="manProp" label="属性" :formatter="changeManProp" width=""></el-table-column>

改变显示的人物属性

changeManProp(row, column){
    const manProp = row[column.property];
    var string = null;
    if(manProp == 0){
        string = "副";
    }
    else{
        string = "主";
    }
    return string;
},
上一篇 下一篇

猜你喜欢

热点阅读