Przeglądaj źródła

长夜模式把内容都呈现出来

liwei 1 rok temu
rodzic
commit
800e253b83

+ 7 - 8
src/modules/editor/components/CompUI/basicUI/Page/component.tsx

@@ -46,7 +46,7 @@ export const Component = defineComponent({
           class={[comp.value.pageMode != "short" && "!h-auto", editor.store.isEditMode ? pageEditStyle : ""]}
         >
           {
-             store.isDisplay && <div class="relative z-1000" style={contextStyle}>
+             (store.isDisplay || (store.isEditMode && controls.screenCtrl.state.screen.pageMode != "short")) && <div class="relative z-1000" style={contextStyle}>
              {slots.Container?.(
                children.default.map((compId) => {
                  const comp = helper.findComp(compId);
@@ -56,15 +56,14 @@ export const Component = defineComponent({
              )}
              {curValue?.value && !editor.store.isEditMode && <PageMusic />}
            </div>
- 
+
           }
           {
-            store.isEditMode && store.currStreamCard && <div class="relative z-1000" style={contextStyle}>
-            {
-              slots.Container?.( [slots.CompItem?.(store.currStreamCard)])
-            }
-          </div>
-
+            store.isEditMode && controls.screenCtrl.state.screen.pageMode == "short" && store.currStreamCard && <div class="relative z-1000" style={contextStyle}>
+              {
+                slots.Container?.( [slots.CompItem?.(store.currStreamCard)])
+              }
+            </div>
           }
 
         </div>

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

@@ -101,16 +101,16 @@ export const View = defineComponent({
                 bottom: style.height,
               }}
             >
-              <div class="absolute w-full h-150px pointer-events-none overflow-hidden">
+              {/* <div class="absolute w-full h-150px pointer-events-none overflow-hidden">
                 <PreComp.Component
                   compId={c.id}
                   key={c.id}
                   style={{ position: "absolute", bottom: "0" }}
                 />
-              </div>
+              </div> */}
               <div class={maskStyleUp}></div>
               <div class={[divideStyle, "bottom"]}>
-                <span class="tip">上一页分割线</span>
+                {/* <span class="tip">上一页分割线</span> */}
               </div>
             </div>
           );
@@ -133,13 +133,13 @@ export const View = defineComponent({
           ) as any;
           return (
             <div class="relative">
-              <div class="h-150px pointer-events-none overflow-hidden">
+              {/* <div class="h-150px pointer-events-none overflow-hidden">
                 <AfterComp.Component compId={c.id} key={c.id} />
-              </div>
+              </div> */}
 
               <div class={maskStyle}></div>
               <div class={[divideStyle, "top"]}>
-                <span class="tip">下一页分割线</span>
+                {/* <span class="tip">下一页分割线</span> */}
               </div>
             </div>
           );
@@ -309,6 +309,7 @@ const CurrCompStyle = css`
   position: relative;
   outline: 1px solid @inf-primary-color;
   z-index: 998;
+  box-shadow: 0 0 0 3000px rgba(0, 0, 0, 0.5);
 `;
 
 //box-shadow: 0 0 0 3000px rgba(0, 0, 0, 0.5);

+ 6 - 3
src/modules/editor/controllers/SelectCtrl/index.ts

@@ -659,12 +659,15 @@ export class SelectCtrl extends ModuleControl<EditorModule> {
     }
 
     this.assistCtrl?.flashDrawCardDists();
-    this.transferStyle.showGizmo = false;
+    this.transferStyle.showGizmo = false; 
+
+    const s = this.controls.editorCtrl.state.scale;
+
 
     //@ts-ignore
     const yoff = this.store.currStreamCard.$el.getBoundingClientRect().top - this.pageEl?.getBoundingClientRect().top;
-    this.transferStyle.baseCardTop = yoff + "px";
-
+    this.transferStyle.baseCardTop = yoff / s  + "px";
+    
     const selector = this.objContainer as ObjsContainer;
     if (!selector) {
       return;

+ 1 - 0
src/modules/editor/module/actions/edit.tsx

@@ -551,6 +551,7 @@ export const editActions = EditorModule.action({
   },
   // 移动组件顺序
   moveComp(selIndex: number, targetIndex: number) {
+    this.actions.selectObjs([]);
     if (selIndex === targetIndex) return;
     this.store.moveComp(selIndex, targetIndex);
   },