瀏覽代碼

feat: 速度重置,重置为当前小节的速度

TIANYONG 10 月之前
父節點
當前提交
1e4a96272f
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 3 3
      src/pages/detail/speed.tsx
  2. 1 0
      src/subpages/colexiu/buttons/index.tsx

+ 3 - 3
src/pages/detail/speed.tsx

@@ -147,9 +147,9 @@ export default defineComponent({
               size="mini"
               round
               onClick={() => {
-                if (detailState.activeDetail) {
-                  changeSpeed(detailState.activeDetail?.originalSpeed)
-                }
+                const currentItem: any = detailState.times[runtime.activeIndex];
+                const currentSpeed = currentItem?.measureSpeed ? currentItem.measureSpeed : detailState.baseSpeed;
+                changeSpeed(currentSpeed)
               }}
             />
           </div>

+ 1 - 0
src/subpages/colexiu/buttons/index.tsx

@@ -110,6 +110,7 @@ export const onChangeModelType = (type: IModelType) => {
   }
   if (type === 'evaluation') {
     // RuntimeUtils.changeSpeed(detailState.activeDetail?.originalSpeed, false)
+    RuntimeUtils.resetBaseRate();
     // 评测模式
     runtime.evaluatingStatus = true
     modelType.value = type