Jeecg Boot 2.2.1 版本发布,低代码平台

This commit is contained in:
zhangdaiscott
2020-07-11 12:54:57 +08:00
parent cb7ae9ca6f
commit 109a95a96b
191 changed files with 28087 additions and 26880 deletions

View File

@ -36,15 +36,20 @@ export async function initDictOptions(dictCode) {
*/
export function filterDictText(dictOptions, text) {
// --update-begin----author:sunjianlei---date:20200323------for: 字典翻译 text 允许逗号分隔 ---
if (text != null && dictOptions instanceof Array) {
if (text != null && Array.isArray(dictOptions)) {
let result = []
// 允许多个逗号分隔
let splitText = text.toString().trim().split(',')
// 允许多个逗号分隔,允许传数组对象
let splitText
if (Array.isArray(text)) {
splitText = text
} else {
splitText = text.toString().trim().split(',')
}
for (let txt of splitText) {
let dictText = txt
for (let dictItem of dictOptions) {
if (txt === dictItem.value.toString()) {
dictText = dictItem.text
if (txt.toString() === dictItem.value.toString()) {
dictText = (dictItem.text || dictItem.title || dictItem.label)
break
}
}