suting 4 years ago
parent
commit
4ca670bde7

BIN
src/assets/images/client/carousels/1.jpg


BIN
src/assets/images/client/carousels/2.jpg


BIN
src/assets/images/client/carousels/3.jpg


BIN
src/assets/images/client/carousels/4.jpg


BIN
src/assets/images/client/carousels/5.jpg


+ 11 - 2
src/views/client/Index.vue

@@ -1,6 +1,12 @@
 <template>
 <template>
     <div class="mta-index">
     <div class="mta-index">
-        HelloKitty ?
+        <div class="block">
+            <el-carousel height="500px">
+                <el-carousel-item v-for="item in topCarousels" :key="item">
+                    <img :src="item" style="width: 100%; height: 100%">
+                </el-carousel-item>
+            </el-carousel>
+        </div>
     </div>
     </div>
 </template>
 </template>
 
 
@@ -16,7 +22,7 @@
         },
         },
         data() {
         data() {
             return {
             return {
-
+                topCarousels: []
             };
             };
         },
         },
         components: {
         components: {
@@ -33,6 +39,9 @@
 
 
         },
         },
         mounted() {
         mounted() {
+            for (let i = 0; i < 5; i++) {
+                this.topCarousels.push(require(`@/assets/images/client/carousels/${i + 1}.jpg`))
+            }
 
 
         },
         },
         beforeDestroy() {
         beforeDestroy() {