网址参考:
https://chenxuan1993.gitee.io/component-document/index_prod#/component/seamless-default
vue-seamless-scroll文字无缝滚动的使用方法
1.项目引入
yarn add vue-seamless-scroll --save
npm i vue-seamless-scroll --save
2.在vue文件中引入方式
①全局引入
import scroll from ‘vue-seamless-scroll‘
Vue.use(scroll)
②局部引入(大型项目的话,建议使用这种方式)
建议如果需求比较复杂,建议下载下来组件源码,放在组件中,这样后面可以修改源码,增加自己的需求,对组件再做二次封装
3.vue-seamless-scroll参数介绍
①:data="数组变量"
注:在<li>中需要用标签包住要显示的数据,如果<li>标签中没有子标签,整个的ul是不往上滚动的
同时如果seamless-wrap这个类名如果没有定义高度,整个的列表滚动时会看到ul重置回到原始位置的过程
<template>
<vue-sea