微信小程序 滚动列表(无限滚动)

<view class='contentBottom'>
    <view class='BottomFirst'>
        <text id='0' data-id='0'>获奖名单</text>
    </view>
    <swiper class="tab-right" style='background:{{bgColor}};' vertical="true" autoplay="true" circular="true" interval="2000" display-multiple-items='4'>
        <view class="right-item">
            <block wx:for-index="idx" wx:for='{{aa}}'>
                <swiper-item>
                    <view class='content-item'>
                        <image src='{{item.avatarUrl}}' class='avater'></image>
                        <text class='name'>{{item.nickName}}</text>
                        <text class='wawa'>获得奖金{{item.reward}}元</text>
                    </view>
                </swiper-item>
            </block> 
            
        </view>
    </swiper>
</view>
/* 底部滚动列表  */
.contentBottom {
    padding: 20rpx 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #f8e1da;
}
.BottomFirst {
    width: 90%;
    display: flex;
    justify-content: space-around;
    border: 1px solid #663a83;
    box-sizing: border-box;
    margin: 0 auto;
}
.BottomFirst text {
    width: 100%;
    text-align: center;
    font-size: 30rpx;
    color: #663a83;
    line-height: 60rpx;
    border-right: 1px solid #663a83;
    box-sizing: border-box;
}
.BottomFirst text:nth-child(1){
    border: none;
}
.tab-right {
    width: 90%;
    margin: 20rpx auto;
    height: 405rpx;
}
.right-item {
    padding: 0 20rpx;
    background: #fbeeed;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}
.content-item {
    height: 100rpx;
    border-bottom: 1px solid #ede1d4;
    width: 95%;
}
.avater {
    height: 50rpx;
    width: 50rpx;
    border-radius: 100rpx;
    margin-top: 25rpx;
    float: left;
}
.name {
    font-size: 26rpx;
    float: left;
    line-height: 100rpx;
    color: #b0aaa9;
    margin-left: 20rpx;
    width: 40%;
    height:100%;
    overflow: hidden;
}
.wawa {
    font-size: 26rpx;
    float: right;
    line-height: 100rpx;
    color: #999;
}
data:{
    aa:[
            {
                nickName:"wang",
                reward:"2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
            {
                nickName: "wang",
                reward: "2"
            },
        ],
}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值