Browse Source

空值不进行回显数据字典

RuoYi 3 years ago
parent
commit
13d9251225
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/utils/ruoyi.js

+ 3 - 0
src/utils/ruoyi.js

@@ -82,6 +82,9 @@ export function selectDictLabel(datas, value) {
 
 // 回显数据字典(字符串数组)
 export function selectDictLabels(datas, value, separator) {
+  if(value === undefined) {
+    return "";
+  }
   var actions = [];
   var currentSeparator = undefined === separator ? "," : separator;
   var temp = value.split(currentSeparator);