fieldType:this.selectitem[index].fieldTypes=='字符'?1:(this.selectitem[index].fieldTypes=='数字'?0:2),
// 数组过滤函数
difference(arr = [], oarr = []) {
return arr.reduce((t, v) => (!oarr.includes(v) && t.push(v), t), [])
},
// 数组对象去重
let hash = {};
this.columns.splice(this.treedata.length,1,{ label: '状态', key: 'opStates' })
const newArr = this.columns.reduceRight((item, next) => {
hash[next.label] ? '' : hash[next.label] = true && item.push(next);
return item
}, []);
console.log(newArr);
this.columns = newArr
//提取数组对象的属性成一个新的数组
this.columns.push({ label:_itemChild.columnName, key: _itemChild.resExtRealId })