Browse Source

修改js会报错和样式问题

lex 1 year ago
parent
commit
245ba86046

+ 1 - 1
src/custom-plugins/guide-page/data-guide.tsx

@@ -148,7 +148,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/home-guide.tsx

@@ -193,7 +193,7 @@ export default defineComponent({
     getAllGuidance();
     const getStepELe = () => {
       const ele: HTMLElement = document.getElementById(`home-${data.step}`)!;
-      console.log(`coai-${data.step}`, data.steps[data.step].eleRectPadding);
+      // console.log(`coai-${data.step}`, data.steps[data.step].eleRectPadding);
       if (ele) {
         const eleRect = ele.getBoundingClientRect();
         const left = data.steps[data.step].eleRectPadding?.left || 0;

BIN
src/custom-plugins/guide-page/images/train3.png


+ 1 - 1
src/custom-plugins/guide-page/lessons-guide.tsx

@@ -182,7 +182,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/music-guide.tsx

@@ -149,7 +149,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/myColloge-guide.tsx

@@ -96,7 +96,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/myResources-guide.tsx

@@ -104,7 +104,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/shareResources-guide.tsx

@@ -137,7 +137,7 @@ export default defineComponent({
             height: eleRect.height + height + 'px'
           };
         }
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/student-guide.tsx

@@ -121,7 +121,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/custom-plugins/guide-page/teacher-guide.tsx

@@ -124,7 +124,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 8 - 8
src/custom-plugins/guide-page/train-guide.tsx

@@ -30,19 +30,19 @@ export default defineComponent({
         {
           ele: '',
           eleRect: {} as DOMRect,
-          img: getImage('train2.png'),
+          img: getImage('train3.png'),
           handStyle: {
-            top: '0.91rem'
+            top: '-0.91rem'
           },
           imgStyle: {
-            top: px2vw(-4),
-            left: px2vw(-250),
+            top: px2vw(-360),
+            left: px2vw(-170),
             width: px2vw(591),
-            height: px2vw(227)
+            height: px2vw(302)
           },
           btnsStyle: {
-            bottom: px2vw(30),
-            left: px2vw(-90)
+            top: px2vw(-205),
+            left: px2vw(-10)
           },
           eleRectPadding: {
             left: 7,
@@ -96,7 +96,7 @@ export default defineComponent({
           width: eleRect.width + width + 'px',
           height: eleRect.height + height + 'px'
         };
-        console.log(`coai-${data.step}`, data.box);
+        // console.log(`coai-${data.step}`, data.box);
       } else {
         handleNext();
       }

+ 1 - 1
src/views/natural-resources/components/my-collect/search-group-resources.tsx

@@ -106,7 +106,7 @@ export default defineComponent({
 
                   nextTick(() => {
                     if (forms.type === 'MUSIC') {
-                      orginHeight.value = collapseWrapRef.value.offsetHeight;
+                      orginHeight.value = collapseWrapRef.value?.offsetHeight;
                       // hiddenHeight.value =
                       //   collapseWrapRef.value.offsetHeight / line.value || 0;
                       // 默认隐藏

+ 2 - 2
src/views/natural-resources/components/share-resources/search-group-resources.tsx

@@ -74,7 +74,7 @@ export default defineComponent({
       await catchStore.getSubjects();
 
       if (forms.type === 'MUSIC') {
-        orginHeight.value = collapseWrapRef.value.offsetHeight;
+        orginHeight.value = collapseWrapRef.value?.offsetHeight;
         // hiddenHeight.value = collapseWrapRef.value.offsetHeight / line.value;
         // 默认隐藏
         getLive();
@@ -97,7 +97,7 @@ export default defineComponent({
 
                   nextTick(() => {
                     if (forms.type === 'MUSIC') {
-                      orginHeight.value = collapseWrapRef.value.offsetHeight;
+                      orginHeight.value = collapseWrapRef.value?.offsetHeight;
                       // hiddenHeight.value =
                       //   collapseWrapRef.value.offsetHeight / line.value || 0;
                       // 默认隐藏

+ 2 - 2
src/views/prepare-lessons/model/select-music/search-group.tsx

@@ -77,8 +77,8 @@ export default defineComponent({
       // 获取声部列表
       await catchStore.getSubjects();
 
-      orginHeight.value = collapseWrapRef.value.offsetHeight;
-      hiddenHeight.value = collapseWrapRef.value.offsetHeight / line.value;
+      orginHeight.value = collapseWrapRef.value?.offsetHeight;
+      hiddenHeight.value = collapseWrapRef.value?.offsetHeight / line.value;
       // 默认隐藏
       getLive();
     });

+ 2 - 2
src/views/prepare-lessons/model/select-resources/select-item/resource-search-group/index.tsx

@@ -139,9 +139,9 @@ export default defineComponent({
                   try {
                     nextTick(() => {
                       if (forms.type === 'MUSIC') {
-                        orginHeight.value = collapseWrapRef.value.offsetHeight;
+                        orginHeight.value = collapseWrapRef.value?.offsetHeight;
                         hiddenHeight.value =
-                          collapseWrapRef.value.offsetHeight / line.value;
+                          collapseWrapRef.value?.offsetHeight / line.value;
                         // 默认隐藏
                         getLive();
                       } else {