<template>
|
|
<vue-seamless-scroll :data="listData" :class-option="classOption" :style="{ height : listData.length > 6 ? '400rpx' :`${listData.length * 60}rpx`}" class="warp">
|
|
<ul class="item">
|
|
<li v-for="(item, index) in listData" :key="index">
|
|
<view class="content">
|
|
<span class="title" v-text="item.auccont"></span>
|
|
<span class="date" v-text="item.money"></span>
|
|
</view>
|
|
</li>
|
|
</ul>
|
|
</vue-seamless-scroll>
|
|
</template>
|
|
|
|
<script>
|
|
import vueSeamlessScroll from 'vue-seamless-scroll'
|
|
|
|
export default {
|
|
name: 'Example01Basic',
|
|
components: {
|
|
vueSeamlessScroll
|
|
},
|
|
props : ['listData'],
|
|
data() {
|
|
return {
|
|
classOption: {
|
|
step: .4,
|
|
limitMoveNum: 1,
|
|
hoverStop: false
|
|
}
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.warp {
|
|
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 {
|
|
display: flex;
|
|
height: 50rpx;
|
|
width: 100%;
|
|
background: rgba(255, 255, 255, .5);
|
|
box-sizing: border-box;
|
|
padding: 0rpx 20%;
|
|
|
|
span{
|
|
width: 50%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|