我们来先看看效果图:
<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;
为了内容标题居中效果
1
2
3
4
5
6
7
8
9
10
是不是简单得雅痞。
————————————————
版权声明:本文为CSDN博主「我是真的cai」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_42164539/article/details/106555528