From 6101a3bf0d3f7e8de375a0b9bfa7ce71a111144c Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 25 九月 2020 11:15:57 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue

---
 ruoyi-ui/src/utils/ruoyi.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index e77b155..e7f4180 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -131,7 +131,7 @@
 	id = id || 'id'
 	parentId = parentId || 'parentId'
 	children = children || 'children'
-	rootId = rootId || 0
+	rootId = rootId || Math.min.apply(Math, data.map(item => { return item[parentId] })) || 0
 	//瀵规簮鏁版嵁娣卞害鍏嬮殕
 	const cloneData = JSON.parse(JSON.stringify(data))
 	//寰幆鎵�鏈夐」

--
Gitblit v1.9.3