dataProviders.getStyleTree('t_prod_category', 't_prod_style').then((res: any) => {
console.log(res, "resssssssss")
let arr: any = []
let arr1: any = [{
key: 0,
title: "品类管理",
}]
res && res.map((item: any, index: number) => {
arr.push({ key: item.id, title: item.category_name, children: [] })
item.t_prod_style && item.t_prod_style.map((item1: any, index1: any) => {
if (arr.children) {
arr[index].children = []
}
arr[index].children.push({ key: item1.id, title: item1.style_name })
})
})
console.log(arr, "arr")
arr1[0].children = arr
setTreeDataList(arr1)
})