修复回显数据字典数组异常问题(I60UYQ)

This commit is contained in:
RuoYi
2022-11-15 14:31:23 +08:00
parent a9938302f0
commit a211d93092
2 changed files with 18 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
/**
* 通用js方法封装处理
@@ -86,11 +86,14 @@ export function selectDictLabel(datas, value) {
return actions.join('');
}
// 回显数据字典(字符串数组)
// 回显数据字典(字符串数组)
export function selectDictLabels(datas, value, separator) {
if (value === undefined) {
if (value === undefined || value.length ===0) {
return "";
}
if (Array.isArray(value)) {
value = value.join(",");
}
var actions = [];
var currentSeparator = undefined === separator ? "," : separator;
var temp = value.split(currentSeparator);
@@ -233,4 +236,4 @@ export async function blobValidate(data) {
} catch (error) {
return true;
}
}
}