Browse Source

Merge branch 'dev' of http://124.70.149.18:10880/lianghj/queenshow into dev

bianjiang 1 year ago
parent
commit
0db0287336

+ 6 - 1
src/modules/editor/components/CompUI/basicUI/View.tsx

@@ -73,7 +73,12 @@ export const View = defineComponent({
                   onClick={() => actions.removeStreamCard(props.compId)}
                 />
               )}
-              <IconAdd onClick={() => actions.addCompToDesign("Container")} />
+              <IconAdd
+                onClick={() => {
+                  const index = store.streamCardIds.indexOf(props.compId) + 1;
+                  actions.addCompToDesign("Container", index);
+                }}
+              />
             </div>
           )}
         </div>

+ 1 - 1
src/modules/editor/module/actions/edit.ts

@@ -47,7 +47,7 @@ export const editActions = EditorModule.action({
       return;
     }
     if (compKey == "Container") {
-      index = this.store.streamCardIds.indexOf(this.store.currStreamCardId) + 1;
+      // index = this.store.streamCardIds.indexOf(this.store.currStreamCardId) + 1;
       const compId = await this.store.insertDesignContent(compKey, index);
       this.actions.pickComp(compId);
       return;