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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user