处理数据时,需要循环多层才能实现,可以考虑使用递归,
而且递归不限制层级
let data = [
{
code:0,
type:'衣服',
children:[
{
code:1,
type:'毛衣',
children:[
{
code:2,
type:'高领',
},
{