瀏覽代碼

做个保护

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