소스 검색

做个保护

harry 1 년 전
부모
커밋
d222e9617d
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/components/VideoSwiper/index.tsx

+ 3 - 0
src/components/VideoSwiper/index.tsx

@@ -100,6 +100,9 @@ export default function VideoSwiper({ list, onFinish, needResumePlay, flushList,
 
         if (activeIndex == current) {
             onFinish(currentListIndex)
+            if (!circular && virualListIndex < list.length - 1){
+                setCircular(true)
+            }
             return
         }
         activeIndex = current