修复了轮播图显示不完整的问题

This commit is contained in:
tsui110 2026-02-07 01:02:07 +08:00
parent 636041d6fa
commit 7fb865b68e

View File

@ -26,7 +26,7 @@
<swiper class="banner-swiper" circular autoplay interval="5000" duration="600" :indicator-dots="false" @change="onBannerChange">
<swiper-item v-for="(b, index) in displayBanners" :key="b.id">
<view class="banner-card" :class="{ 'active': bannerIndex === index }">
<image v-if="b.image" class="banner-image" :src="b.image" mode="aspectFill" @tap="onBannerTap(b)" />
<image v-if="b.image" class="banner-image" :src="b.image" mode="aspectFit" @tap="onBannerTap(b)" />
<view v-else class="banner-fallback">
<view class="fallback-glow"></view>
<text class="banner-fallback-text">{{ b.title || 'KE DAYA TOYS' }}</text>
@ -457,11 +457,12 @@ export default {
.banner-swiper {
height: 360rpx;
overflow: visible;
}
.banner-card {
height: 100%;
margin: 0 4rpx;
margin: 0;
border-radius: 40rpx;
overflow: hidden;
position: relative;