vue插件实现循环滚动列表——vue-seamless-scroll
https://blog.csdn.net/weixin_45389051/article/details/106379832?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-0&spm=1001.2101.3001.4242
https://chenxuan1993.gitee.io/component-document/index_prod#/component/seamless-default
1 <template> 2 <div class="index"> 3 <div class="banner"> 4 <div class="width1000"> 5 <el-input 6 class="search-input" 7 placeholder="搜索资源" 8 v-model="searchKey"> 9 <i slot="prefix" class="el-input__icon el-icon-search"></i> 10 </el-input> 11 </div> 12 </div> 13 14 <div class="notice-box"> 15 <div class="width1000"> 16 <vue-seamless-scroll :data="newsList" :class-option="optionLeft" class="seamless-warp2"> 17 <ul class="item"> 18 <li v-for="(item, index) in newsList" :key="index" v-text="item.title"></li> 19 </ul> 20 </vue-seamless-scroll> 21 </div> 22 </div> 23 </div> 24 </template> 25 26 <script> 27 import vueSeamlessScroll from 'vue-seamless-scroll' 28 export default{ 29 name: 'index', 30 components:{ 31 vueSeamlessScroll 32 }, 33 data(){ 34 return { 35 searchKey: '', 36 newsList: [{ 37 'title': '1、所有组件的 输入输出格式要遵循一定标准,最起码可以跟踪一个尝试执行的用例。' 38 }, { 39 'title': '2、编排时,每个组件都额外编排一个前置的' 40 }, { 41 'title': '3、自己实现日志消费服务,监控 syslog 通过TCP端口 发送过来的日志,消费整理,把分析写入业务数据库' 42 }] 43 } 44 }, 45 computed: { 46 optionLeft () { 47 return { 48 direction: 2, // 左方向 49 limitMoveNum: 3 50 } 51 } 52 }, 53 mounted(){ 54 55 }, 56 methods:{ 57 58 } 59 } 60 </script> 61 62 <style lang="scss" scoped> 63 .index { 64 .banner { 65 width: 100%; 66 height: 460px; 67 background: url('../assets/images/banner-bg.png') no-repeat left top; 68 background-size: 100% 100%; 69 .width1000 { 70 display: flex; 71 justify-content: center; 72 .search-input { 73 width: 760px; 74 margin-top: 300px; 75 /deep/ .el-input__inner { 76 height: 50px; 77 line-height: 50px; 78 } 79 } 80 } 81 } 82 .notice-box { 83 height: 38px; 84 line-height: 38px; 85 background: #011130; 86 color: #fff; 87 .seamless-warp2 { 88 overflow: hidden; 89 height: 38px; 90 width: 100%; 91 ul.item { 92 width: 100%; 93 li { 94 float: left; 95 margin-right: 10px; 96 font-size: 14px; 97 } 98 } 99 } 100 } 101 102 } 103 </style>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
2020-05-08 传智黑马git学习笔记
2020-05-08 element-ui 实现行合并-亲测有效!
2020-05-08 ESLint入坑
2020-05-08 [tslint] Identifier 'loggedIn' is never reassigned; use 'const' instead of 'let'. (prefer-const)
2020-05-08 报错:for..in loops iterate over the entire prototype chain, which is virtually never what you want.