From 5c4f0c5503cf9412cc5baa62e6d97bcf658784bd Mon Sep 17 00:00:00 2001 From: 若依 <yzz_ivy@163.com> Date: 星期二, 18 八月 2020 17:21:51 +0800 Subject: [PATCH] !65 根节点为子部门时,树状结构显示问题 Merge pull request !65 from GSTong/master --- ruoyi-ui/src/utils/ruoyi.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 0c0f590..4333f82 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -1,4 +1,4 @@ -/** +锘�/** * 閫氱敤js鏂规硶灏佽澶勭悊 * Copyright (c) 2019 ruoyi */ @@ -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