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

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

上级 5a605bf0
<template> <template>
<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">
<view> <text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''"
<view class="flex-row"> v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)">
<text ref="swipertab" class="swiper-tabs-item" :class="swiperIndex==index ? 'swiper-tabs-item-active' : ''" {{item.title}}
v-for="(item, index) in swiperList" :key="index" @click="onTabClick(index)"> </text>
{{item.title}}
</text>
</view>
<view ref="indicator" class="swiper-tabs-indicator"></view>
</view> </view>
<view ref="indicator" class="swiper-tabs-indicator"></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">
...@@ -148,6 +145,7 @@ ...@@ -148,6 +145,7 @@
<style> <style>
.flex-row { .flex-row {
flex-direction: row; flex-direction: row;
align-self: flex-start;
} }
.swiper-list { .swiper-list {
...@@ -188,4 +186,4 @@ ...@@ -188,4 +186,4 @@
font-size: 72px; font-size: 72px;
font-weight: bold; font-weight: bold;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册