zhangjie 2 жил өмнө
parent
commit
b424bda525

+ 8 - 1
src/modules/question/components/QuestionImportEdit.vue

@@ -278,7 +278,14 @@ export default {
     mergeObjData(targetObj, cacheObj) {
       let data = { ...targetObj };
       Object.keys(cacheObj).forEach((k) => {
-        data[k] = this.isNull(cacheObj[k]) ? targetObj[k] : cacheObj[k];
+        if (k === "quesAnswer") {
+          data[k] =
+            this.isNull(targetObj[k]) || targetObj[k] === "[]"
+              ? cacheObj[k]
+              : targetObj[k];
+        } else {
+          data[k] = this.isNull(targetObj[k]) ? cacheObj[k] : targetObj[k];
+        }
       });
       return data;
     },