Browse Source

做个保护

harry 1 year ago
parent
commit
d222e9617d
1 changed files with 3 additions and 0 deletions
  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) {
         if (activeIndex == current) {
             onFinish(currentListIndex)
             onFinish(currentListIndex)
+            if (!circular && virualListIndex < list.length - 1){
+                setCircular(true)
+            }
             return
             return
         }
         }
         activeIndex = current
         activeIndex = current