From 6b2838141af2f5354803c05991a3b386559b0aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 14 Mar 2025 16:14:49 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E4=B8=8D=E5=AD=98=E5=9C=A8=E5=B1=9E=E6=80=A7=20?= =?UTF-8?q?=E5=88=99=E5=81=9A=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/ruoyi.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/ruoyi.ts b/src/utils/ruoyi.ts index 07a4a6b..79f5547 100644 --- a/src/utils/ruoyi.ts +++ b/src/utils/ruoyi.ts @@ -171,6 +171,9 @@ export const handleTree = (data: any[], id?: string, parentId?: string, child for (const d of data) { const id = d[config.id]; childrenListMap[id] = d; + if (!d[config.childrenList]) { + d[config.childrenList] = []; + } } for (const d of data) {