mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-04 11:50:59 +00:00
优化selectDictLabel方法,数组迭代器换为some
This commit is contained in:
@@ -68,10 +68,10 @@ export function addDateRange(params, dateRange) {
|
||||
// 回显数据字典
|
||||
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 @@ export function tansParams(params) {
|
||||
}
|
||||
})
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user