소스 검색

日常开发

林旭祥 3 주 전
부모
커밋
79ebf95fca
2개의 변경된 파일6개의 추가작업 그리고 31개의 파일을 삭제
  1. 4 8
      src/components/MultipleItem/index.vue
  2. 2 23
      src/views/train/multiple.vue

+ 4 - 8
src/components/MultipleItem/index.vue

@@ -140,9 +140,7 @@ const getMessage = (e: any) => {
   if (e.cmd === 'set_exam_state') {
     examState.value = e.data;
     if (e.data === 3) {
-      if (props.needStart == false) {
-        initProject();
-      }
+      initProject();
     }
     if (e.data === 40) {
       cleanData();
@@ -526,11 +524,9 @@ watch(() => resultId.value, (newVal, oldVal) => {
 */
 watch(() => props.examState, (newVal, oldVal) => {
   if (newVal == 3 && examState.value == 43) {
-    if (props.needStart == false) {
-      setTimeout(() => {
-        initProject();
-      }, 10000)
-    }
+    setTimeout(() => {
+      initProject();
+    }, 10000)
   }
   //父状态已经进入41了就不要等子组件40清空数据了
   if (newVal == 41) {

+ 2 - 23
src/views/train/multiple.vue

@@ -164,7 +164,7 @@ const multipleItemRef = (el: any, index: number, area: any) => {
  */
 const getOpenOneTestAndStartFace = () => {
   cleanData();
-  examState.value = 40;
+  examState.value = 41;
   for (let i = 0; i < multipleItemRefList.value.length; i++) {
     multipleItemRefList.value[i].getOpenOneTestAndStartFace();
   }
@@ -941,7 +941,7 @@ onBeforeMount(() => {
   }
   //需要开始按钮的项目
   let myList = ['situp', 'jumprope', 'jumpingjack', 'highknees', 'pullup', 'sidepullup', 'squat', 'jumpleftright', 'crossjump', 'kneeupclap'];
-  if (myList.includes(project) && [2, 3].includes(styleType.value)) {
+  if (myList.includes(project) && styleType.value == 3) {
     needStart.value = true;
   }
   //加载音乐
@@ -1666,27 +1666,6 @@ $waiPadding: 6.51rem;
   $listMargin: 5vw;
   $listWidth: calc((100% - $listMargin) / 10);
 
-  height: calc((($listMargin / 10) + 14vh) * 5);
-  overflow-y: scroll;
-
-  &::-webkit-scrollbar {
-    width: 10px;
-  }
-
-  &::-webkit-scrollbar-thumb {
-    border-width: 2px;
-    border-radius: 4px;
-    border-style: dashed;
-    border-color: transparent;
-    background-color: rgba(26, 62, 78, 0.9);
-    background-clip: padding-box;
-  }
-
-  &::-webkit-scrollbar-button:hover {
-    border-radius: 6px;
-    background: rgba(26, 62, 78, 1);
-  }
-
   .ul {
     width: 100%;
     height: 14vh;