Browse Source

修改样式

lex-xin 2 months ago
parent
commit
ed14028c5d

+ 16 - 6
src/components/layout/guide-section/guide-drag.ts

@@ -201,14 +201,24 @@ export default function useDrag(
           baseSize.winHeight = baseSize.maxHeight - 100;
         }
 
-        const translateY = (baseSize.windowHeight - baseSize.defaultHeight) / 2;
-        baseSize.transformX =
-          baseSize.windowWidth - baseSize.defaultWidth - initPos.right;
-        baseSize.transformY = translateY;
         dragStyles.maxHeight = getSizeToUnit(baseSize.maxHeight);
 
-        baseSize.width = baseSize.defaultWidth;
-        baseSize.height = baseSize.defaultHeight;
+        if (windowInfo.windowType === 'LARGE') {
+          baseSize.transformX = (baseSize.windowWidth - baseSize.winWidth) / 2;
+          baseSize.transformY =
+            (baseSize.windowHeight - baseSize.winHeight) / 2 -
+            baseSize.layoutTopHeight / 2;
+          baseSize.width = baseSize.winWidth;
+          baseSize.height = baseSize.winHeight;
+        } else {
+          const translateY =
+            (baseSize.windowHeight - baseSize.defaultHeight) / 2;
+          baseSize.transformX =
+            baseSize.windowWidth - baseSize.defaultWidth - initPos.right;
+          baseSize.transformY = translateY;
+          baseSize.width = baseSize.defaultWidth;
+          baseSize.height = baseSize.defaultHeight;
+        }
 
         // 初始化定位
         if (initSize?.defaultPosition === 'center') {

+ 3 - 5
src/components/layout/guide-section/index.module.less

@@ -77,12 +77,12 @@
       height: 22px;
       margin-left: 12px;
       cursor: pointer;
-      transition: .2s ease;
+      transition: 0.2s ease;
 
       &:hover {
         background-color: rgba(34, 71, 133, 0.08);
         border-radius: 4px;
-        transition: .2s ease;
+        transition: 0.2s ease;
       }
     }
     .screen {
@@ -187,7 +187,6 @@
     // .n-collapse .n-collapse-item:not(:first-child)
     .n-collapse-item__header-main {
       line-height: 22px;
-
     }
     .n-collapse-item__content-inner {
       padding-top: 0 !important;
@@ -209,11 +208,11 @@
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
+    border-radius: 6px;
     &:hover,
     &.active {
       color: #097bec;
       background: #e8f4ff;
-      border-radius: 6px;
     }
   }
 
@@ -292,4 +291,3 @@
     }
   }
 }
-

+ 2 - 1
src/components/layout/guide-section/index.tsx

@@ -279,7 +279,8 @@ export default defineComponent({
                       <TheSearch
                         round={false}
                         v-model:value={opInfo.searchValue}
-                        onSearch={async () => {
+                        onSearch={async (val: string) => {
+                          opInfo.searchValue = val;
                           await getTeacherManual();
                           if (windowInfo.windowType === 'LARGE') {
                             const id = opInfo.dataList[0]?.children[0]?.id;

+ 4 - 2
src/views/prepare-lessons/model/courseware-type/index.module.less

@@ -408,11 +408,13 @@
         width: 7px;
         height: 7px;
         position: absolute;
-        top: 4px;
-        right: 4px;
+        top: 3px;
+        right: 3px;
         background-color: #EA4132;
+        border: 1px solid #fff;
         border-radius: 5px;
         display: inline-block;
+        box-sizing: content-box;
       }
 
       &:hover {