bianjiang 1 year ago
parent
commit
8ae187929d

+ 1 - 2
src/modules/editor/controllers/PageCtrl/index.ts

@@ -144,7 +144,7 @@ export class PageCtrl extends ModuleControl<EditorModule> {
           if (status == "succ") {
             const comp = this.helper.findComp(item.id);
             if (comp) {
-              comp.value.url = fpath;
+              set(comp, "value.url", fpath);
             }
 
             if (prjCtrl.isOnlineUrl(assetUrl)) {
@@ -180,7 +180,6 @@ export class PageCtrl extends ModuleControl<EditorModule> {
         delete this.store.filesCacheUrl[e];
       }
     });
-    debugger;
     const ok = await deviceCtrl.WriteFileText(
       `${prjCtrl.RootDir}/queen5/assets.cache.queen5`,
       JSON.stringify(this.store.filesCacheUrl)

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

@@ -94,7 +94,7 @@ export const editActions = EditorModule.action({
       const currComp = createObj({ compKey: "Video" }, false);
       // currComp.setSize(W,  H );
       currComp.value.url = url;
-      page.designData.compMap[currComp.id] = currComp;      
+      page.designData.compMap[currComp.id] = currComp;
       // page.setCompPid(currComp.id, page.currStreamCardId);
       const childIds = [...page.currStreamCard.children.default];
       childIds.push(currComp.id);
@@ -134,7 +134,7 @@ export const editActions = EditorModule.action({
     let currCard = page.currStreamCard;
 
     const currComp = createObj({ compKey }, false);
-    // debugger
+
     //@ts-ignore
     const objs: any[] = currComp.children.objs || [];
     if (objs.length > 0) {
@@ -143,7 +143,7 @@ export const editActions = EditorModule.action({
         page.setCompPid(o.id, currComp.id);
       });
     }
-    page.designData.compMap[currComp.id] = currComp;  
+    page.designData.compMap[currComp.id] = currComp;
     page.setCompPid(currComp.id, currCard.id);
     const childIds = [...currCard.children.default];
     childIds.push(currComp.id);

+ 1 - 0
src/modules/editor/module/helpers/index.ts

@@ -37,6 +37,7 @@ export const helpers = EditorModule.helper({
     const compMap = this.controls.pageCtrl.compMap;
     if (!compMap) return;
     const comp = compMap[compId];
+
     if (comp) return comp;
   },
   isStreamCard(compId: string) {