reloaded 4 anni fa
parent
commit
5ca920b868
1 ha cambiato i file con 18 aggiunte e 2 eliminazioni
  1. 18 2
      src/views/partisan/parts/newsDetail.vue

+ 18 - 2
src/views/partisan/parts/newsDetail.vue

@@ -8,8 +8,12 @@
           <span>时间:{{ details.publish_time }}</span>
         </div>
         <el-col :span="24" class="image" v-if="details.img_url">
-          <el-col :span="24" v-for="(item, index) in details.img_url" :key="index">
-            <el-image :src="item"></el-image>
+          <el-col :span="24" class="images">
+            <el-carousel indicator-position="outside" height="500px" width="700px">
+              <el-carousel-item v-for="(item, index) in details.img_url" :key="index" class="ruleList">
+                <el-image :src="item" v-if="item"></el-image>
+              </el-carousel-item>
+            </el-carousel>
           </el-col>
         </el-col>
         <p v-html="details.content"></p>
@@ -66,4 +70,16 @@ export default {
     margin-bottom: 0 0 15px 0;
   }
 }
+.images {
+  cursor: pointer;
+  height: 500px;
+  width: 700px;
+  margin: 10px auto;
+  float: none;
+}
+.images .el-image {
+  width: 100%;
+  height: 100%;
+  position: relative;
+}
 </style>