qinyan 1 年間 前
コミット
396ec8f795

+ 6 - 4
src/modules/editor/controllers/ReactCtrl/rxValue.ts

@@ -1,6 +1,7 @@
+import { cloneDeep } from "lodash";
+import { BehaviorSubject } from "rxjs";
+import { reactive } from "vue";
 import { HistoryController } from "./history";
-import {BehaviorSubject} from "rxjs";
-import { reactive } from  "vue";
 
 export class ValueSnap {
     Id:string;
@@ -128,7 +129,7 @@ class RxValue {
                     out[name] = obj[name].toJson();
                     return;
                 }
-                out[name] = obj._rxs[name].getValue().value;
+                out[name] = cloneDeep(obj._rxs[name].getValue().value);
             })
             return out;
         }
@@ -163,4 +164,5 @@ class RxValue {
     }
 }
 
-export {RxValue};
+export { RxValue };
+

+ 2 - 2
src/modules/editor/module/actions/edit.tsx

@@ -459,7 +459,7 @@ export const editActions = EditorModule.action({
           ctrl.compMap[cp1.id] = cp1;
           ctrl.setCompPid(cp1.id, c.id);
           childs[index] = cp1.id;
-          deepCopy(cp);
+          deepCopy(cp1);
         });
       }
     };
@@ -470,7 +470,7 @@ export const editActions = EditorModule.action({
       news.push(cp1.id);
       ctrl.compMap[cp1.id] = cp1;
       ctrl.setCompPid(cp1.id, ctrl.currStreamCardId);
-      deepCopy(cp);
+      deepCopy(cp1);
     });
     this.actions.addComps(news);