element ui table 枚举值转义,将$nbsp;内容转义成空字符串

在el-table-column中添加:formatter = "problemSourceFormat"
<el-table>
<el-table-column
prop="name"
label="课程名称"
:formatter = "problemSourceFormat"
></el-table-column>
<el-table-column prop="chars" label="关联资源"></el-table-column>
</el-table>
problemSourceFormat方法
problemSourceFormat:function(data){
      if(data.name){
        return data.name.replace(/&nbsp;/ig, " ");
      }
    }
原文地址:https://www.cnblogs.com/lvlisn/p/14930046.html