Browse Source

修改样式

lex-xin 9 months ago
parent
commit
4e321766b7

+ 3 - 5
src/api/cloudTextbooks.api.ts

@@ -9,11 +9,9 @@ export const queryLessonCourseware_gym = (type: string, abortController: AbortCo
       method: "post",
       url: "/api-teacher/lessonCourseware/queryLessonCourseware",
       data: {
-         query: {
-            subjectId: type,
-            page: 1,
-            rows: 9999
-         }
+         subjectId: type,
+         page: 1,
+         rows: 9999
       }
    })
 }

+ 5 - 9
src/businessComponents/globalTools/globalTools.vue

@@ -111,7 +111,6 @@ function drag(el: HTMLElement) {
       // const maxLeft = clientWidth - parentElementRect.width
       const maxTop = clientHeight - parentElementRect.height
       function onMousemove(e: MouseEvent) {
-         console.log("eeeeeeee", e)
          // let moveX = parentElementRect.left + (e.clientX - downX)
          let moveY = parentElementRect.top + (e.clientY - downY)
          // let moveY = e.clientY - downY
@@ -159,10 +158,6 @@ onMounted(() => {
    drag(iconToolsDom.value!)
    drag(expendToolsDom.value!)
    refreshPos()
-
-   iconToolsDom.value!.onclick = (e: any) => {
-      e.stopPropagation()
-   }
    window.addEventListener("resize", onResize)
 })
 
@@ -199,12 +194,12 @@ onUnmounted(() => {
    .iconTools,
    .expendTools {
       position: fixed;
-      right: -2px;
+      right: -6px;
       top: 0;
       transform: translateY(var(--toolTranslateY));
       // margin-top: -29px;
       z-index: 2999;
-      padding: 0 5px;
+      // padding: 0 5px;
       background: rgba(0, 0, 0, 0.4);
       border-radius: 200px 0px 0px 200px;
       border: 2px solid rgba(255, 255, 255, 0.3);
@@ -250,7 +245,7 @@ onUnmounted(() => {
          // margin: 0 30px;
       }
       .iconArrow {
-         padding: 12px 15px;
+         padding: 7px 15px;
          width: 28px;
          height: 28px;
       }
@@ -266,7 +261,8 @@ onUnmounted(() => {
       // transition: transform 0.2s ease;
       // transition-delay: 0.2s;
       transform: translateY(var(--toolTranslateY));
-      display: block;
+      display: flex;
+      align-items: center;
    }
 }
 </style>

+ 2 - 2
src/components/ellipsisScroll/ellipsisScroll.vue

@@ -41,7 +41,7 @@ let widthCalc = 0
 function handleIsScroll(e: MouseEvent) {
    const target = e.target as HTMLElement
    widthCalc = target.scrollWidth - target.clientWidth
-   if (widthCalc >= 0) {
+   if (widthCalc > 0) {
       isScroll.value = true
    } else {
       isScroll.value = false
@@ -49,7 +49,7 @@ function handleIsScroll(e: MouseEvent) {
 }
 function handleAutoScroll(target: any) {
    widthCalc = target.scrollWidth - target.clientWidth
-   if (widthCalc >= 0) {
+   if (widthCalc > 0) {
       isScroll.value = true
    } else {
       isScroll.value = false

+ 19 - 1
src/views/coursewarePlay/components/courseMenuCollapse/courseMenuCollapse.vue

@@ -13,7 +13,12 @@
             <div class="current" v-if="item.useFlag">当前</div>
          </div>
          <div class="text">
-            <ellipsisScroll :autoScroll="item.useFlag" :title="item.lessonCoursewareName" />
+            <el-tooltip popper-class="singleton-tooltip" :offset="5" :showArrow="false" :placement="'top'">
+               <template #content>
+                  <div :style="{ maxWidth: `180px` }">{{ item.lessonCoursewareName }}</div>
+               </template>
+               <div ref="tooltipDom" class="tooltipAutoShow">{{ item.lessonCoursewareName }}</div>
+            </el-tooltip>
          </div>
       </div>
    </div>
@@ -100,6 +105,19 @@ function handleClick(value: any) {
          line-height: 20px;
          overflow: hidden;
       }
+
+      .tooltipAutoShow {
+         overflow: hidden;
+         white-space: nowrap;
+         text-overflow: ellipsis;
+      }
    }
 }
 </style>
+<style lang="scss">
+.singleton-tooltip {
+   background: rgba(0, 0, 0, 0.7) !important;
+   font-size: 14px !important;
+   font-weight: 500 !important;
+}
+</style>