<template>
|
|
<vue-seamless-scroll :data="listData" :class-option="classOption" class="warp">
|
|
<ul class="item">
|
|
<li v-for="(item, index) in listData" :key="index">
|
|
<view class="content">
|
|
<span class="title" v-text="item.title"></span>
|
|
<span class="date" v-text="item.date"></span>
|
|
</view>
|
|
</li>
|
|
</ul>
|
|
</vue-seamless-scroll>
|
|
</template>
|
|
|
|
<script>
|
|
import vueSeamlessScroll from 'vue-seamless-scroll'
|
|
|
|
export default {
|
|
name: 'Example01Basic',
|
|
components: {
|
|
vueSeamlessScroll
|
|
},
|
|
data() {
|
|
return {
|
|
listData: [{
|
|
'title': 'Get a commission',
|
|
'date': '666'
|
|
}, {
|
|
'title': 'Get a commission16'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '777'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '888'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '999'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '111'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '222'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '333'
|
|
}, {
|
|
'title': 'Get a commission',
|
|
'date': '4444'
|
|
}],
|
|
classOption: {
|
|
step: .5
|
|
}
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.warp {
|
|
height: 100%;
|
|
width: 80%;
|
|
margin: 0 auto;
|
|
overflow: hidden;
|
|
|
|
ul {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0 auto;
|
|
|
|
li,
|
|
a {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 60rpx;
|
|
justify-content: space-between;
|
|
font-size: 15px;
|
|
border-radius: 15rpx;
|
|
overflow: hidden;
|
|
|
|
.content {
|
|
height: 50rpx;
|
|
width: 100%;
|
|
background: rgba(255, 255, 255, .5);
|
|
box-sizing: border-box;
|
|
padding: 0rpx 10% 0rpx 30%;
|
|
|
|
span{
|
|
margin-left: 15rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|