Przeglądaj źródła

查体无数据兼容

zhouna 6 lat temu
rodzic
commit
1a76fc862a
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      src/store/async-actions/fetchModules.js

+ 2 - 1
src/store/async-actions/fetchModules.js

@@ -166,9 +166,10 @@ export function pregetCheckbodyData(flag){     //flag=true获取到数据后立
         });
         if(flag){
           const arr = checkFullfillText(data).newArr;
+          const block = Object.assign(JSON.parse(config.textLabel),{full:true});//空白时保留一个自由文本标签
           dispatch({
             type:SET,
-            data:arr,
+            data:arr.length?arr:[block],
             isEmpty:false
           });
           dispatch({type:MODI_LOADING,flag:false});