
1.这种可以用for循环进行代码编写
// 遍历传入的默认值
if(val.length > 0){
val.forEach(item => {
// 遍历组件内部默认字典
this.titleList.forEach(ele => {
// 交叉对比
if (ele.relename == item.cofield_name) {
// 遍历下拉框内的值,若匹配,则赋值
this.quotaList.forEach(e => {
if (item.realfield_name_cn === e.label) {
ele.field_id = e.key;
ele.field_name = e.label;
}else{
this.compare(this.hisReleFields);
}
});
}
});
});