liwei 1 jaar geleden
bovenliggende
commit
73636c50d9

+ 1 - 1
src/modules/editor/components/CompUI/basicUI/Transfer/streamCard.tsx

@@ -51,7 +51,7 @@ export const StreamCardTransfer = defineComponent({
                 onMousedown={(e) => {
                     e.stopPropagation();
                     
-                    streamCardTransferCtrl.mousedown(e, "resizeY")
+                    streamCardTransferCtrl.mousedown(e, "resizeY", store.currStreamCard)
                 }
               }
             >

+ 4 - 2
src/modules/editor/components/Viewport/Content/index.tsx

@@ -29,6 +29,8 @@ export default defineUI({
     return () => {
       const pageRoot = helper.findRootComp();
       if (!pageRoot) return;
+      const streamCardIndex = store.streamCardIds.indexOf(store.currStreamCardId)
+
       return (
         <div class="scrollbar overflow-y-auto h-1/1">
           <div class={"w-375px my-60px mx-auto select-none " + contentCls}>
@@ -58,9 +60,9 @@ export default defineUI({
                         store.currCompId !== "root" &&
                         !store.textEditingState &&
                         store.currCompId !== store.currStreamCardId && 
-                        !state.draging && <Transfer key={store.currCompId} />}
+                        !state.draging && <Transfer key={store.currCompId + streamCardIndex} />}
 
-                      {store.currStreamCardId && <StreamCardTransfer key={store.currStreamCardId} />}
+                      {store.currStreamCardId && <StreamCardTransfer key={store.currStreamCardId + streamCardIndex} />}
                     </>
                   );
                 },

+ 5 - 1
src/modules/editor/module/stores/index.ts

@@ -71,7 +71,7 @@ export const store = EditorModule.store({
       
       this.store.currCompId = compId;
       this.store.currStreamCardId = "";
-      
+
       const find = (objs:string[], id:string):boolean=>{
         if (!objs || objs.length < 1) return false
 
@@ -130,6 +130,10 @@ export const store = EditorModule.store({
       const { pageCompIds } = this.store;
       const [selComp] = pageCompIds.splice(selIndex, 1);
       pageCompIds.splice(targetIndex, 0, selComp);
+      
+      // const currStreamCardId = this.store.currStreamCardId;
+      // this.store.setCurrComp("")
+      // this.store.currStreamCardId = currStreamCardId;
     },
     setTextEditingState(state: boolean) {
       this.store.textEditingState = state;