guhongwei 4 лет назад
Родитель
Сommit
2910d7b4ff
1 измененных файлов с 16 добавлено и 13 удалено
  1. 16 13
      src/views/channel/detail.vue

+ 16 - 13
src/views/channel/detail.vue

@@ -29,15 +29,14 @@
               <span>选集</span>
             </el-col>
             <el-col :span="24" class="two">
-              <van-swipe :loop="false" :width="150">
-                <van-swipe-item
-                  class="videodata"
-                  v-for="(item, index) in form.videodata"
-                  :key="index"
-                  @click="searchvideo(index, item)"
-                  :class="{ active: changeColor == index }"
-                >
-                  <p>{{ item.name }}</p>
+              <!-- <van-swipe :loop="false" :width="150">
+                <van-swipe-item class="list" v-for="(item, index) in form.videodata" :key="index" @click="searchvideo(index, item)">
+                  <p :class="{ active: changeColor == index }">{{ item.name }}</p>
+                </van-swipe-item>
+              </van-swipe> -->
+              <van-swipe>
+                <van-swipe-item class="list" v-for="(item, index) in form.videodata" :key="index" @click="searchvideo(index, item)">
+                  <p :class="{ active: changeColor == index }">{{ item.name }}</p>
                 </van-swipe-item>
               </van-swipe>
             </el-col>
@@ -77,6 +76,7 @@ export default {
   },
   async created() {
     await this.search();
+
     this.searchvideo('0', this.form.videodata[0]);
   },
   methods: {
@@ -168,12 +168,15 @@ export default {
     }
     .two {
       margin-top: 5px;
-      .videodata {
-        min-height: 80px;
+      .list {
+        text-align: center;
+        height: 105px;
+        padding: 1% 0;
         background: #f1f1f1;
-        margin: 0 10px 0 0;
-        padding: 10px;
         border-radius: 5px;
+        p {
+          padding: 0 10px;
+        }
       }
     }
   }