From 0713f97730271a2088081cfc63638ba8e53ffe3b Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Sun, 06 Jul 2025 15:48:37 +0800
Subject: [PATCH] style
---
src/views/market/components/hangqing.vue | 34 +++++++++++++++++++++++++++-------
1 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/src/views/market/components/hangqing.vue b/src/views/market/components/hangqing.vue
index 938725d..a854baa 100644
--- a/src/views/market/components/hangqing.vue
+++ b/src/views/market/components/hangqing.vue
@@ -70,16 +70,26 @@
<h3 class="small justify-center" text="2xl">{{ item }}</h3>
</el-carousel-item> -->
<!-- </el-carousel> -->
- <el-carousel :interval="5000" arrow="always" indicator-position="none">
+ <el-carousel :interval="5000" arrow="always">
<el-carousel-item v-for="(item, index) in imgLists" :key="index">
<div class="img-box">
<img
- v-for="(_item, _index) in imgLists[index]"
- :key="_index"
style="margin-right: 20px; border-radius: 12px"
- width="350"
- height="160"
- :src="_item.image"
+ width="300"
+ height="173"
+ :src="item[0].image"
+ />
+ <img
+ style="margin-right: 20px; border-radius: 12px"
+ width="300"
+ height="173"
+ :src="item[1].image"
+ />
+ <img
+ style="margin-right: 20px; border-radius: 12px"
+ width="300"
+ height="173"
+ :src="item[2].image"
/>
</div>
</el-carousel-item>
@@ -9748,7 +9758,17 @@
// language = this.$i18n.locale;
// }
Axios.getBanner({ model: "top" }).then((res) => {
- this.imgLists[0] = res.data;
+ const data = res.data;
+ let groupedArray = [[], []];
+
+ for (let i = 0; i < data.length; i++) {
+ if (groupedArray[0].length >= 3) {
+ groupedArray[1].push(data[i]);
+ } else {
+ groupedArray[0].push(data[i]);
+ }
+ }
+ this.imgLists = groupedArray;
});
},
// 获取所有symbol
--
Gitblit v1.9.3