const filterTree = (options = {})=>{
let ops = {data: options.data || [],
exclude: options.exclude || {},}
let excludeAttrs = Object.keys(ops.exclude)
let treeData = []
let dg = (data) =>{data.forEach((item,index)=>{
excludeAttrs.every(attr=>{let attrs = attr.split('.')
let val = attrs.reduce(a=>{return item[a]
})
return item[attr] !== ops.exclude[attr]
}) && treeData.push(item)
item.children
})
}
}