Bladeren bron

修改优化

lex-xin 4 maanden geleden
bovenliggende
commit
f9361f3b54

+ 4 - 4
src/views/exercise-record/modals/detail-item.tsx

@@ -98,13 +98,13 @@ export default defineComponent({
             </p>
             <p class={styles.dotSub}> 综合得分</p>
           </div>
-          <div class={styles.itemBottomDot}>
+          {props.item.rhythmFlag ? '' : <div class={styles.itemBottomDot}>
             <p class={styles.dotMain}>
               {props.item.intonation || 0}
               <span>分</span>{' '}
             </p>
             <p class={styles.dotSub}>音准 </p>
-          </div>
+          </div>}
           <div class={styles.itemBottomDot}>
             <p class={styles.dotMain}>
               {props.item.cadence || 0}
@@ -112,13 +112,13 @@ export default defineComponent({
             </p>
             <p class={styles.dotSub}>节奏 </p>
           </div>
-          <div class={styles.itemBottomDot}>
+          {props.item.rhythmFlag ? '' : <div class={styles.itemBottomDot}>
             <p class={styles.dotMain}>
               {props.item.integrity || 0}
               <span>分</span>{' '}
             </p>
             <p class={styles.dotSub}>完成度 </p>
-          </div>
+          </div>}
         </div>
       </div>
     );

+ 15 - 15
src/views/knowledge-library/examination-mode/index.tsx

@@ -442,9 +442,9 @@ export default defineComponent({
                             {state.questionList.length}
                           </div>
                           <div class={styles.questionType}>
-                            {countDownRef.current.value.minutes +
-                              countDownRef.current.value.hours * 60}
-                            :{countDownRef.current.value.seconds}
+                            {(countDownRef.current.value.minutes +
+                              countDownRef.current.value.hours * 60).toString().padStart(2, '0')}
+                            :{(countDownRef.current.value.seconds).toString().padStart(2, '0')}
                           </div>
                         </div>
                       )
@@ -467,9 +467,9 @@ export default defineComponent({
                             {state.questionList.length}
                           </div>
                           <div class={styles.questionType}>
-                            {countDownRef.current.value.minutes +
-                              countDownRef.current.value.hours * 60}
-                            :{countDownRef.current.value.seconds}
+                            {(countDownRef.current.value.minutes +
+                              countDownRef.current.value.hours * 60).toString().padStart(2, '0')}
+                            :{(countDownRef.current.value.seconds).toString().padStart(2, '0')}
                           </div>
                         </div>
                       )
@@ -499,9 +499,9 @@ export default defineComponent({
                             {state.questionList.length}
                           </div>
                           <div class={styles.questionType}>
-                            {countDownRef.current.value.minutes +
-                              countDownRef.current.value.hours * 60}
-                            :{countDownRef.current.value.seconds}
+                            {(countDownRef.current.value.minutes +
+                              countDownRef.current.value.hours * 60).toString().padStart(2, '0')}
+                            :{(countDownRef.current.value.seconds).toString().padStart(2, '0')}
                           </div>
                         </div>
                       )
@@ -523,9 +523,9 @@ export default defineComponent({
                             {state.questionList.length}
                           </div>
                           <div class={styles.questionType}>
-                            {countDownRef.current.value.minutes +
-                              countDownRef.current.value.hours * 60}
-                            :{countDownRef.current.value.seconds}
+                            {(countDownRef.current.value.minutes +
+                              countDownRef.current.value.hours * 60).toString().padStart(2, '0')}
+                            :{(countDownRef.current.value.seconds).toString().padStart(2, '0')}
                           </div>
                         </div>
                       )
@@ -548,9 +548,9 @@ export default defineComponent({
                             {state.questionList.length}
                           </div>
                           <div class={styles.questionType}>
-                            {countDownRef.current.value.minutes +
-                              countDownRef.current.value.hours * 60}
-                            :{countDownRef.current.value.seconds}
+                            {(countDownRef.current.value.minutes +
+                              countDownRef.current.value.hours * 60).toString().padStart(2, '0')}
+                            :{(countDownRef.current.value.seconds).toString().padStart(2, '0')}
                           </div>
                         </div>
                       )