소스 검색

fix: 导出判断

linweizeng 3 년 전
부모
커밋
94eea934bf
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

+ 5 - 3
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -793,9 +793,11 @@ export default {
      */
     formatterOptions(value, options, valueKey = 'value', labelKey = 'label') {
       const optionObj = {}
-      options.map(option => {
-        optionObj[option[valueKey]] = option[labelKey]
-      })
+      if(options){
+        options.map(option => {
+          optionObj[option[valueKey]] = option[labelKey]
+        })
+      }
       const aryValue = value.split(',')
       const res = aryValue.map((v) => {
         return optionObj[v] || v