美文网首页
uniapp 使用swiper实现文字列表无限滚动

uniapp 使用swiper实现文字列表无限滚动

作者: jing_bao | 来源:发表于2021-09-22 10:22 被阅读0次
<template>
    <view>
        <view class="scroll_box"> 
            <swiper class="swiper" circular="true" vertical="true" display-multiple-items="3" :autoplay="autoplay" :interval="interval" :duration="duration">
                <swiper-item v-for="(item,index) in list" :key="index">
                    <view class="swiper-item uni-bg-green">{{item}}</view>
                </swiper-item>
            </swiper>
        </view>
    </view>
</template>
<script>
    export default{
        name:'',
        data(){
            return{
                autoplay:true,
                interval:1000,
                duration:2000,
                list:[
                    '请点击发行菜单进行发布',
                    '体积较大;若要正式发布',
                    '运行模式下不压缩代码且含有sourcemap',
                    '检查是否启动多个微信开发者工具,如果是则关闭所有打开的微信开发者工具,',
                    '然后再重新运行',
                    '如果出现微信开发者工具启动后白屏的问题',
                    '或者关闭微信开发者工具,然后再从HBuilderX中启动指定页面',
                    '可以通过微信开发者工具切换pages.json中condition配置的页面',
                    '中修改文件并保存,会自动刷新微信模拟器',
                    '微信开发者工具已启动,在HBuilderX'
                ],
            }
        },
    }
</script>
<style scoped lang="scss">
    .scroll_box{
        background: #FFFFFF;
        margin: 30rpx;
        border-radius: 10rpx;
        .swiper{
            margin-top: 200px;
            height: 70px;
        }
    }
</style>

相关文章

网友评论

      本文标题:uniapp 使用swiper实现文字列表无限滚动

      本文链接:https://www.haomeiwen.com/subject/wndqjktx.html