js代码
this.ProData.forEach(item => {
if (item.type == “ooo”) {
item.type = “哈哈”;
}
if (item.type== “vvv”) {
item.type = “嘻嘻”;
}
if (item.type == “ddd”) {
item.type= “哦哦”;
}
在foreach里面直接把每一项的json串转换
item.functionSource = JSON.parse(item.functionSource);
});
html代码
<el-table-column label="来源">
<template slot-scope="scope">
{{scope.row.functionSource.productName}}
</template>
</el-table-column>