uni-app微信小程序使用Swiper实现公告滚动效果
我们来先看看效果图:<view class="notice" v-if="noticeList.length"><text class="left">系统公告</text><swiper class="swiper-nav" :circular="true" vertical="true" :autoplay="true" :interval="5000"
·
我们来先看看效果图:
<view class="notice" v-if="noticeList.length">
<text class="left">系统公告</text>
<swiper class="swiper-nav" :circular="true" vertical="true" :autoplay="true" :interval="5000" :duration="1000">
<swiper-item style="display: table;" @touchmove.stop='stopTouchMove' v-for="(item,index) in noticeList" :key="index">
<view style="display: table-cell;vertical-align: middle;" class="right">{{item.messageContent}}</view>
</swiper-item>
</swiper>
</view>
PS: display: table;display: table-cell;vertical-align: middle;
为了内容标题居中效果
是不是简单得雅痞。
更多推荐



所有评论(0)