From f84b1574191610803681f0c70d64b7c20a5af750 Mon Sep 17 00:00:00 2001 From: 若依 <yzz_ivy@163.com> Date: 星期五, 04 九月 2020 14:17:32 +0800 Subject: [PATCH] !87 数据权限中的空值处理 Merge pull request !87 from sproutcat/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..b79f44c 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