Jelajahi Sumber

style: ui修改

TIANYONG 1 tahun lalu
induk
melakukan
cebb8548da

+ 12 - 2
src/components/select-courseware-pop/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, ref } from 'vue';
+import { defineComponent, ref, reactive } from 'vue';
 import styles from './index.module.less';
 import popBox from './select_courseware_box.png';
 import popClose from './selce_courseware_close.png';
@@ -13,6 +13,16 @@ export default defineComponent({
   },
   emits: ['close', 'select'],
   setup(props, { emit }) {
+    const data = reactive({
+      actIdx: null as any,
+    });
+    const selectItem = (item: any, index: any) => {
+      data.actIdx = index
+      setTimeout(() => {
+        emit('select', item)
+        data.actIdx = null
+      }, 300);
+    }
     return () => (
       <div class={styles.popBox} onClick={(e: Event) => e.stopPropagation()}>
         <div class={styles.popBody}>
@@ -23,7 +33,7 @@ export default defineComponent({
           <ul class={styles.list}>
             {props.list.map((item: any, index: number) => {
               return (
-                <li onClick={() => emit('select', item)}>{item.name}</li>
+                <li class={data.actIdx === index ? styles.active : ''} onClick={() => selectItem(item, index)}>{item.name}</li>
               );
             })}
           </ul>

TEMPAT SAMPAH
src/components/select-courseware-pop/select_courseware_box.png


+ 13 - 16
src/views/courseware-list/component/book/index.tsx

@@ -296,9 +296,6 @@ export default defineComponent({
             })
             if (res?.code == 200 && res.data?.length) {
               // console.log(res.data)
-              res.data.forEach((n: any) => {
-                n.coursewareDetailKnowledgeId = n.coursewareDetailKnowledgeId || item.id
-              })
               data.coursewareList = res.data;
               // 如果只有一个课件,直接进入该课件
               if (res.data.length == 1) {
@@ -339,19 +336,19 @@ export default defineComponent({
             c_orientation: 0 // 0 横屏 1 竖屏
           }
         });
-        // router.push({
-        //   path: '/courseware-play',
-        //   query: {
-        //     id: item.id,
-        //     subjectId: props.subjectId,
-        //     lessonCoursewareId: item.lessonCoursewareId,
-        //     courseId: props.bookData.id,
-        //     lessonCoursewareDetailId: item.lessonCoursewareDetailId,
-        //     name: item.name,
-        //     tab: props.tab,
-        //     coursewareDetailKnowledgeId: item.coursewareDetailKnowledgeId
-        //   }
-        // });
+        router.push({
+          path: '/courseware-play',
+          query: {
+            id: item.id,
+            subjectId: props.subjectId,
+            lessonCoursewareId: item.lessonCoursewareId,
+            courseId: props.bookData.id,
+            lessonCoursewareDetailId: item.lessonCoursewareDetailId,
+            name: item.name,
+            tab: props.tab,
+            coursewareDetailKnowledgeId: item.coursewareDetailKnowledgeId
+          }
+        });
       }
     };
 

+ 1 - 0
src/views/courseware-play/component/chapter.module.less

@@ -16,6 +16,7 @@
   padding: 16px 10px 12px 13px;
   flex-shrink: 0;
   font-size: 14px;
+  font-weight: 500;
 
   img {
     width: 16px;

+ 3 - 2
src/views/courseware-play/component/instrument-info/index.module.less

@@ -138,14 +138,15 @@
                 display: flex;
                 flex-direction: column;
                 align-items: center;
+                padding-top: 8px;
                 > img {
                     width: 138px;
-                    height: 120px;
+                    height: 110px;
                 }
                 > span {
                     font-size: 14px;
                     color: #999999;
-                    margin-top: 4px;
+                    margin-top: 6px;
                 }
             }
         }

+ 6 - 3
src/views/courseware-play/component/point.module.less

@@ -12,16 +12,16 @@
 
 .pointHead {
   display: flex;
-  align-items: center;
-  padding: 13px 10px 0 15px;
+  padding: 16px 10px 12px 13px;
   flex-shrink: 0;
-  font-size: 16px;
+  font-size: 14px;
   font-weight: 500;
 
   img {
     width: 16px;
     height: 16px;
     margin-right: 7px;
+    margin-top: 4px;
   }
 }
 
@@ -157,6 +157,9 @@
     margin-right: 5px;
   }
 
+  .firstArrow {
+    margin-top: 3px;
+  }
   .itemImage {
     width: 15px;
     height: 15px;

+ 1 - 2
src/views/courseware-play/component/points.tsx

@@ -115,7 +115,6 @@ export default defineComponent({
             accordion>
             {props.allList.map((item: any) => (
               <CollapseItem
-                center
                 class={[
                   styles.collapseItem,
                   pointData.kjId === item.id ? styles.activeItem : ''
@@ -198,7 +197,7 @@ export default defineComponent({
                   ),
                   icon: () => (
                     <img
-                      class={styles.arrow}
+                      class={[styles.arrow, styles.firstArrow]}
                       src={
                         pointData.kjId === item.id
                           ? chapterDown

+ 2 - 2
src/views/tempo-practice/index.tsx

@@ -174,7 +174,7 @@ export default defineComponent({
       state.speedList.forEach((item: any) => {
         if (item.value === setting.speed) item.color = '#1CACF1';
       });
-      if (setting.scorePart.length <= 0) {
+      if (setting?.scorePart?.length <= 0) {
         renderScore();
       }
 
@@ -218,7 +218,7 @@ export default defineComponent({
 
         <div class={styles.conCon}>
           <div class={styles.container}>
-            {setting.scorePart.map((item: any, i: number) => (
+            {setting.scorePart?.map((item: any, i: number) => (
               <div
                 class={[
                   styles.beatSection,