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