1 回答

TA贡献1818条经验 获得超3个赞
var arry = ["股票开户", "期贷开户", "基金定股", "我的股东户", "服务中心", "私人顾问", "股票分析", "华泰证券", "股票行情"]
var arry1 = ["股票开户", "期贷开户", "基金定股", "我的股东户", "服务中心", "股票分析", "股票行情"]
var arr3 = [];
arry.forEach(function(e,i) {
var pos = arry1.indexOf(e);
if (pos > -1) {
arr3.push({
label:e,
value:e,
disabled:false
})
arry1.splice(pos,1);
} else {
arr3.push({
label:e,
value:e,
disabled:true
})
}
})
arry1.length && arry1.forEach(function(e,i) {
arr3.push({
label: e,
value: e,
disabled: true
})
})
console.log(arr3)
添加回答
举报