树型结构转一维List

树形结构转一维 list原始数据const data = [ { name: "a", children: [ { name: "a1", children: [ {