refactor(TemplateCarousel): remove unnecessary swiper props

remove the unused skip-hidden-item-layout and easing-function attributes from the swiper component, and clean up prop formatting for the child TemplateCard
This commit is contained in:
duanshuwen
2026-07-23 22:26:14 +08:00
parent 2f9ede3993
commit 18e85af78f

View File

@@ -8,15 +8,13 @@
</view>
<swiper class="template-rail" :current="currentIndex" :duration="280" :previous-margin="swiperMargin"
:next-margin="swiperMargin" :skip-hidden-item-layout="true" easing-function="easeOutCubic"
@change="handleSwiperChange" @transition="handleSwiperTransition"
:next-margin="swiperMargin" @change="handleSwiperChange" @transition="handleSwiperTransition"
@animationfinish="handleSwiperAnimationFinish">
<swiper-item v-for="(template, index) in templates" :key="template.templateId || index">
<view class="template-slide">
<view class="template-slide-card" :class="{ 'is-active': index === currentIndex }">
<TemplateCard :template="template" :active="index === currentIndex"
:playing="!isSwiperMoving && index === settledIndex"
@select="handleSelect(template, index)" />
:playing="!isSwiperMoving && index === settledIndex" @select="handleSelect(template, index)" />
</view>
</view>
</swiper-item>