mo 3 rokov pred
rodič
commit
dcc662229b

+ 12 - 13
src/views/teamDetail/componentCourse/studentWork.vue

@@ -113,11 +113,10 @@
       append-to-body
       :visible.sync="workVisible"
       v-if="workVisible"
-
     >
       <!-- activeUrl -->
       <div class="sliderWrap">
-        {{activeRow.urlList.length}}
+        {{ activeRow.urlList.length }}
         <div class="swiperWrap">
           <swiper
             ref="mySwiper"
@@ -128,12 +127,10 @@
             :cleanup-styles-on-destroy="false"
           >
             <swiper-slide
-            class="swiper-no-swiping"
+              class="swiper-no-swiping"
               v-for="(item, index) in activeRow.urlList"
               :key="index"
             >
-            {{activeIndex +'--'+index}}
-              <!--  -->
               <div class="videoWrap" v-if="activeIndex == index">
                 <video
                   style="width: 480px"
@@ -254,11 +251,11 @@ export default {
       activeRow: null,
       activeIndex: 0,
       swiperOptions: {
-        noSwiping : true,
+        noSwiping: true,
         // autoHeight: true,
         observer: true, //修改swiper自己或子元素时,自动初始化swiper
         observeParents: true, //修改swiper的父元素时,自动初始化swiper
-        observeSlideChildren:true,
+        observeSlideChildren: true,
         speed: 300,
         loop: true,
         pagination: ".swiper-pagination",
@@ -268,7 +265,7 @@ export default {
         },
         on: {
           slideChange: (val) => {
-            console.log('掉用slideChange')
+            // console.log("掉用slideChange");
             this.activeIndex = val.realIndex;
           },
         },
@@ -350,11 +347,10 @@ export default {
       }).then((res) => {
         if (res.code == 200) {
           this.activeCommit = res.data.rows;
-          this.activeIndex= 0;
+          this.activeIndex = 0;
 
           this.workVisible = true;
 
-
           // item.up = false
         }
       });
@@ -365,13 +361,16 @@ export default {
     },
     prev(val) {
       this.$nextTick(() => {
-        this.swiper.slidePrev();
+        // this.swiper.slidePrev();
+          this.$refs.mySwiper.$swiper.slidePrev();
       });
     },
     next(val) {
       this.$nextTick(() => {
-        console.log(this.swiper.slideNext,this.swiper.slideNext());
-        this.swiper.slideNext();
+        // console.log(this.swiper.slideNext, this.swiper.slideNext());
+        this.$refs.mySwiper.$swiper.slideNext();
+
+        // this.swiper.slideNext();
       });
     },
     lookReplied(row) {