RuoYi
2020-07-30 4126f634baf8be303ac4309b072f413b232e3919
优化selectDictLabel方法,数组迭代器换为some
1 files modified
6 ■■■■ changed files
ruoyi-ui/src/utils/ruoyi.js 6 ●●●● patch | view | raw | blame | history
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
}
}