From efb41d2f6ed3fa345cd69278bdc1c41fc8e4e261 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 14 Mar 2025 16:14:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/ruoyi.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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格式