result.Tags.tags.forEach((item,index)=>{
let idx1 = result.Tags.lightHighArr.indexOf(item)
let idx2 = result.Tags.wordArrAppend.indexOf(item)
if(idx1 !== -1 ){
html += "<li class='lightHighArr'>" + item + "</li>"
}else if(idx2 !==-1 ){
html += "<li class='wordArrAppend'>" + item + "</li>"
}
else{
html += "<li>" + item + "</li>";
}
})
标签:Tags,样式,indexOf,html,else,item,俩个,result,数组
From: https://www.cnblogs.com/HatcherBlogs/p/17250879.html