diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index 2bc6db0..7aa9ab6 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -167,6 +167,9 @@ export function handleTree(data, id, parentId, children) { for (let d of data) { let id = d[config.id]; childrenListMap[id] = d; + if (!d[config.childrenList]) { + d[config.childrenList] = []; + } } for (let d of data) { @@ -216,7 +219,7 @@ export function getNormalPath(p) { if (res[res.length - 1] === '/') { return res.slice(0, res.length - 1) } - return res; + return res } // 验证是否为blob格式