From 2f18d0d7094b10e169b77a0ea741bd101dbbf1f8 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期六, 18 九月 2021 16:01:52 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- ruoyi-ui/src/utils/ruoyi.js | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 68fb6bb..10533e7 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -72,8 +72,8 @@ export function selectDictLabel(datas, value) { var actions = []; Object.keys(datas).some((key) => { - if (datas[key].dictValue == ('' + value)) { - actions.push(datas[key].dictLabel); + if (datas[key].value == ('' + value)) { + actions.push(datas[key].label); return true; } }) @@ -117,6 +117,22 @@ return str; } +// 鏁版嵁鍚堝苟 +export function mergeRecursive(source, target) { + for (var p in target) { + try { + if (target[p].constructor == Object) { + source[p] = mergeRecursive(source[p], target[p]); + } else { + source[p] = target[p]; + } + } catch(e) { + source[p] = target[p]; + } + } + return source; +}; + /** * 鏋勯�犳爲鍨嬬粨鏋勬暟鎹� * @param {*} data 鏁版嵁婧� -- Gitblit v1.9.3