标签:过滤器 map turn == ret foreach col filters reac
res.data.two5.pData.map(row=>{
if(row.name===‘一般‘)
row.itemStyle = {
"color": "#5B9BD5"
}
if(row.name===‘严重‘)
row.itemStyle = {
"color": "#FFC000"
}
if(row.name===‘非常严重‘)
row.itemStyle = {
"color": "#FF0000"
}
return row;
});
过滤器
filters : {
createColors(data){
var colors = [];
if(data.rows==undefined){
return colors;
}
data.rows.forEach(row=>{
colors.push(row.itemStyle.color)
});
return colors;
},
}
标签:过滤器 map turn == ret foreach col filters reac
原文地址:https://www.cnblogs.com/wcss/p/11026955.html