提交 01d865c7 编写于 作者: 杜庆泉's avatar 杜庆泉

swiper text 居中

上级 c2933b29
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
<view class="uni-margin-wrap"> <view class="uni-margin-wrap">
<swiper class="swiper" :vertical="verticalSelect" :indicator-dots="dotsSelect" :autoplay="autoplaySelect" :interval="intervalSelect" :circular="circularSelect" :indicator-color="indicatorColor" :indicator-active-color="indicatorColorActive" :disable-touch="disableTouchSelect" :current="currentVal" :current-item-id="currentItemIdVal" @change="swiperChange" @transition="swiperTransition" @animationfinish="swiperAnimationfinish"> <swiper class="swiper" :vertical="verticalSelect" :indicator-dots="dotsSelect" :autoplay="autoplaySelect" :interval="intervalSelect" :circular="circularSelect" :indicator-color="indicatorColor" :indicator-active-color="indicatorColorActive" :disable-touch="disableTouchSelect" :current="currentVal" :current-item-id="currentItemIdVal" @change="swiperChange" @transition="swiperTransition" @animationfinish="swiperAnimationfinish">
<swiper-item item-id="A"> <swiper-item item-id="A">
<view class="swiper-item uni-bg-red">A</view> <view class="swiper-item uni-bg-red"><text class="swiper-item-Text">A</text></view>
</swiper-item> </swiper-item>
<swiper-item item-id="B"> <swiper-item item-id="B">
<view class="swiper-item uni-bg-green">B</view> <view class="swiper-item uni-bg-green"><text class="swiper-item-Text">B</text></view>
</swiper-item> </swiper-item>
<swiper-item item-id="C"> <swiper-item item-id="C">
<view class="swiper-item uni-bg-blue">C</view> <view class="swiper-item uni-bg-blue"><text class="swiper-item-Text">C</text></view>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
...@@ -169,4 +169,12 @@ ...@@ -169,4 +169,12 @@
text-align: center; text-align: center;
} }
.swiper-item-Text {
width: 100%;
text-align:center;
line-height: 300rpx;
}
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册