<template>
<view class='myself'>
<view class='task-wrapper'>
<swiper class='swiper' display-multiple-items='2' next-margin='100rpx'>
<swiper-item class='item' v-for='(item, idx) in reslist' v-key='idx'>
<view class='pad'>
<image class='taskimg' :src='item.taskimg'></image>
<view class='taskname'>{{item.taskname}}</view>
<view class='reward'>+{{item.conis}}金币</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
export default {
data() {
return {
reslist: [
{taskimg: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1763044357,684998663&fm=27&gp=0.jpg', taskname: '头像更新', conis: 2},
{taskimg: 'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1763044357,684998663&fm=27&gp=0.jpg', taskname: '头像更新', conis: 2}
]
}
},
onLoad:function(){}
}
</script>
<style lang='stylus'>
.myself
width: 100%
background: #fff
.task-wrapper
padding: 40upx
width: 100%
.swiper
height: 300upx
width: 100%
.item
padding: 0 12upx
box-sizing: border-radius
text-align: center
box-sizing: border-box
width: 232upx
.pad
box-sizing: border-box
border: 1upx solid RGBA(0, 0, 0, .1)
.taskimg
width: 66upx
height: 52upx
padding-top: 20upx
.taskname
padding-top: 16upx
font-size: 29upx
.reward
color: #DDBE6E
font-size: 24upx
padding: 12upx 0
</style>
数据数在小于display-multiple-items设置的展示数时 数据不显示了
8***@qq.com (作者)
数据如果是1条的话,你还显示吗
2018-10-16 17:41
Trust
回复 8***@qq.com:额,这个目前是这样实现的,后面看是否调整或者优化下。使用的时候注意下吧,已经反馈给相关同事了。
2018-10-16 17:48
8***@qq.com (作者)
回复 Trust:好的 谢谢
2018-10-16 17:59