mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 19:41:57 +08:00
* docs: 更新文档 * break: plugin-layout优化api * break: 去掉switch配置,改为使用navigation * feat: 重构layout * docs: 升级文档 * feat: 无logo和title时隐藏dom * fix: 修复一些问题 * fix: 配置提示 * fix: build watch copy 路径识别问题 * docs: 文档 Co-authored-by: winixt <haizekuo@gmail.com>
9 lines
226 B
JavaScript
9 lines
226 B
JavaScript
export const flatNodes = (nodes = []) =>
|
|
nodes.reduce((res, node) => {
|
|
res.push(node);
|
|
if (node.children) {
|
|
res = res.concat(flatNodes(node.children));
|
|
}
|
|
return res;
|
|
}, []);
|