From 4126f634baf8be303ac4309b072f413b232e3919 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Thu, 30 Jul 2020 18:14:51 +0800
Subject: [PATCH] 优化selectDictLabel方法,数组迭代器换为some
---
ruoyi-ui/src/utils/ruoyi.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index f834dda..8011992 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -68,10 +68,10 @@
// 回显数据字典
export function selectDictLabel(datas, value) {
var actions = [];
- Object.keys(datas).map((key) => {
+ Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + value)) {
actions.push(datas[key].dictLabel);
- return false;
+ return true;
}
})
return actions.join('');
@@ -144,4 +144,4 @@
}
})
return result
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3