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;
},
}
所有评论(0)