(1)安装执行命令
npm install vue-seamless-scroll --save
(2)在main.js文件里面引入使用:
import scroll from 'vue-seamless-scroll'
Vue.use(scroll)
(3) 实例
<template>
<vue-seamless-scroll :data="listData" :class-option="optionHover" class="seamless-warp">
<ul class="item">
<li v-for="item in listData">
<span class="title" v-text="item.title"></span>
</li>
</ul>
</vue-seamless-scroll>
</template>
<style lang="scss" scoped>
.seamless-warp {
height: 229px;
overflow: hidden;
}