SOURCE

let list = [{
    value: 'zhinan',
    label: '指南',
    children: [{
        label: '设计原则',
        children: [{
            label: '一致'
        }, {
            label: '反馈'
        }, {
            label: '效率'
        }, {
            label: '可控'
        }]
    }, {
        label: '导航',
        children: [{
            label: '侧向导航'
        }, {
            label: '顶部导航'
        }]
    }]
}, {
    label: '组件',
    children: [{
        label: 'Basic',
        children: [{
            label: 'Layout 布局'
        }, {
            label: 'Color 色彩'
        }, {
            label: 'Typography 字体'
        }, {
            label: 'Icon 图标'
        }, {
            label: 'Button 按钮'
        }]
    }, {
        label: 'Form',
        children: [{
            label: 'Radio 单选框'
        }, {
            label: 'Checkbox 多选框'
        }, {
            label: 'Input 输入框'
        }, {
            label: 'InputNumber 计数器'
        }, {
            value: 'select',
            label: 'Select 选择器'
        }, {
            label: 'Cascader 级联选择器'
        }, {
            label: 'Switch 开关'
        }, {
            label: 'Slider 滑块'
        }, {
            label: 'TimePicker 时间选择器'
        }, {
            label: 'DatePicker 日期选择器'
        }, {
            label: 'DateTimePicker 日期时间选择器'
        }, {
            label: 'Upload 上传'
        }, {
            label: 'Rate 评分'
        }, {
            label: 'Form 表单'
        }]
    }, {
        label: 'Data',
        children: [{
            label: 'Table 表格',
            children: [{
                label: 'Table 表格1',

            }]
        }, {
            label: 'Tag 标签'
        }, {
            label: 'Progress 进度条'
        }, {
            label: 'Tree 树形控件'
        }, {
            label: 'Pagination 分页'
        }, {
            label: 'Badge 标记'
        }]
    }, {
        label: 'Notice',
        children: [{
            label: 'Alert 警告'
        }, {
            label: 'Loading 加载'
        }, {
            label: 'Message 消息提示'
        }, {
            label: 'MessageBox 弹框'
        }, {
            label: 'Notification 通知'
        }]
    }, {
        label: 'Navigation',
        children: [{
            label: 'NavMenu 导航菜单'
        }, {
            label: 'Tabs 标签页'
        }, {
            label: 'Breadcrumb 面包屑'
        }, {
            label: 'Dropdown 下拉菜单'
        }, {
            label: 'Steps 步骤条'
        }]
    }, {
        label: 'Others',
        children: [{
            label: 'Dialog 对话框'
        }, {
            label: 'Tooltip 文字提示'
        }, {
            label: 'Popover 弹出框'
        }, {
            label: 'Card 卡片'
        }, {
            label: 'Carousel 走马灯'
        }, {
            label: 'Collapse 折叠面板'
        }]
    }]
}, {
    label: '资源',
    children: [{
        label: 'Axure Components',
        children: [{
            label: 'Table 表格2',

        }]
    }, {
        label: 'Sketch Templates'
    }, {
        label: '组件交互文档'
    }]
}]

async function asd(arr) {
    for (let index = 0; index < arr.length; index++) {
        await getItem()
        console.log(arr[index].label)
        if (arr[index].children && arr[index].children.length > 0) {
            await asd(arr[index].children)
        }
    }

}

function getItem() {
    return new Promise((reslove) => {
        setTimeout(() => {
            reslove()
        }, 100)
    })
}

asd(list)
console 命令行工具 X clear

                    
>
console