liwei 1 год назад
Родитель
Сommit
cdfb9af88d

+ 11 - 3
src/modules/editor/module/actions/editWithManualHistory.ts

@@ -5,8 +5,16 @@ import { CompObject } from "../../controllers/SelectCtrl/compObj";
 
 export const manualActions = EditorModule.action({
   pickComp(compId: string) {
-    if (this.store.currCompId == compId) return;
-
+    if (this.store.currCompId == compId) {
+      if (this.controls.selectCtrl.selected.length < 1 ) {
+        const paths = this.helper.getCompTrees(compId)
+        const cardChilds = paths[2];
+        if (cardChilds) {
+            this.controls.selectCtrl.selecteObjs([new CompObject(cardChilds)]);
+        }
+      }
+      return;
+    }
     const { historyCtrl } = this.controls;
     const isActionRoot = !historyCtrl.historyActionDoing;
 
@@ -15,7 +23,7 @@ export const manualActions = EditorModule.action({
     this.store.setCurrComp(compId);
     historyCtrl.historyCombine = false;
     if (isActionRoot) historyCtrl.historyActionDoing = false;
-    
+
     const paths = this.helper.getCompTrees(compId)
     const cardChilds = paths[2];
     if (cardChilds) {

+ 0 - 1
src/modules/editor/objects/DesignTemp/versions/1.0.0.ts

@@ -8,7 +8,6 @@ export function dataTransform(data: any) {
     return data;
   }
   data.version = "1.0.0";
-  debugger;
 
   if (!data.compMap) {
     data.compMap = {