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

优化“下划线样式swiper-list”view的层级已经不能横向滑动的问题

上级 5a605bf0
<template>
<view class="swiper-list">
<scroll-view ref="tabScroll" class="swiper-tabs" :scroll-x="true" :show-scrollbar="false">
<!-- TODO 多一层 view -->
<view>
<view class="flex-row">
<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)">
{{item.title}}
</text>
</view>
<view ref="indicator" class="swiper-tabs-indicator"></view>
<view class="flex-row">
<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)">
{{item.title}}
</text>
</view>
<view ref="indicator" class="swiper-tabs-indicator"></view>
</scroll-view>
<swiper ref="swiper" class="swiper-view" :current="swiperIndex" @transition="onSwiperTransition"
@animationfinish="onSwiperAnimationfinish">
......@@ -148,6 +145,7 @@
<style>
.flex-row {
flex-direction: row;
align-self: flex-start;
}
.swiper-list {
......@@ -188,4 +186,4 @@
font-size: 72px;
font-weight: bold;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册