:style="{ 'color' : item. num == 2 ? '#000' : '#fff'}"
:style="{ 'color' : myColor}"
:class="['box', item.type== '已完成' ?'box1': item.type== '未完成? 'box2' : 'box3']"
:class=" [item.type== '已完成 ? ' box1 ':' box2']" >
www(type) {
switch (type) {
case type == "true":
return color: red';
case type == "false"
return"color:#575757" ;
break ;
},
}
handlewidth(text, index, type, childrenData) {
let borderstyle = "1px solid #ff" ;
let width = text.length * 14;
if (index == 0 && type == "table") borderStyle = "none";
if (type = "flowchart") {
borderStyle = "none' ;
if (childrenData.length == 1) {
return `border-left:${borderStyle};flex:1;`;
}
if (width <= 220 && width / 2<=220) {
return `border-left:${borderStyle};width:270px;`;
} else {
return `border-left:${borderStyle};width:${width / 2 + 60}px`;
}
} else {
if (childrenData.length == 1) {
return : border- left : ${borderStyle};flex:1; ;
}
if (width <= 220) {
return `border-left:${borderStyle};width:220px;`;
} else if (width <= 220 && width / 2<=220) {
return `border-left:${borderStyle};width:220px;`;
} else {
return `border-left:${borderStyle};width:${width / 2 + 10}px`;
}
}
},
//图片
<img class style="width:100%;” :src="url" alt />
this.url= require(' ./ ../../../ ../ common/ assets/img/1.png )
//背景图片
navStyle(index,item){
if(index == item){
return(
"background: url(" +
require(' /../../../ ../ common/ assets/ img/ danStatus/DF-5A.png) +
”no-repeat; background-size: 100% 100%”
);
}
}
"