提交 5a605bf0 编写于 作者: DCloud-yyl's avatar DCloud-yyl

优化“复杂长列表”示例view的层级

上级 78996dee
...@@ -6,16 +6,13 @@ ...@@ -6,16 +6,13 @@
</view> </view>
<view class="swiper-list"> <view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false"> <scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false">
<!-- TODO 多一层 view --> <view class="flex-row" style="align-self: flex-start;">
<view style="align-self: flex-start; align-items: flex-start;">
<view class="flex-row">
<text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''" <text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''"
v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)"> v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)">
{{item.name}} {{item.name}}
</text> </text>
</view> </view>
<view ref="indicator" class="swiper-tabs-indicator"></view> <view ref="indicator" class="swiper-tabs-indicator"></view>
</view>
</scroll-view> </scroll-view>
<swiper ref="swiper" class="swiper-view" :current="swiperIndex" @transition="onSwiperTransition" <swiper ref="swiper" class="swiper-view" :current="swiperIndex" @transition="onSwiperTransition"
@animationfinish="onSwiperAnimationfinish"> @animationfinish="onSwiperAnimationfinish">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册