swiper 垂直滚动
<template>
<div style="height: 100%;width: 100%;">
<swiper
:direction="'vertical'"
:loop='true'
:allowTouchMove='false'
:observer='true'
:observeParents='true'
:autoplay="{
delay: 2500,
disableOnInteraction: false,
}"
:modules="modules"
:slidesPerView='4'
>
<swiper-slide v-for="(cItem, index) in WarnData" :key="index">
{{ cItem.path }}
</swiper-slide>
</swiper>
</div>
</template>
<script>
import { Swiper, SwiperSlide } from 'swiper/vue';
import { Autoplay } from 'swiper/modules';
import 'swiper/css';
let vm = null
export default {
components: {
Swiper,
SwiperSlide
},
props: {
value: {
type: Array,
default() {
return []
}
}
},
data() {
return {
modules: [Autoplay],
WarnData: [
{ path: 'WarnTable1', title: 'slide1', code: '1', quantity: 20, amount: 100 },
{ path: 'WarnTable2', title: 'slide2', code: '2', quantity: 20, amount: 100 },
{ path: 'WarnTable3', title: 'slide3', code: '3', quantity: 20, amount: 100 },
{ path: 'WarnTable4', title: 'slide4', code: '4', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
{ path: 'WarnTable5', title: 'slide5', code: '5', quantity: 20, amount: 100 },
]
}
},
activated() {
// 看自己的需求,本项目点击slide之后需要跳转到详情,但是这个页面没有关闭,所以需要重新初始化,不然再回到这个页面,slide就不会自动滚动了
this.init()
},
mounted() {
},
methods: {
}
}
</script>
<style lang="less" scoped>
// @import 'swiper.css';
.swiper {
height: 500px;
width: 100%;
}
.warn_table_ul {
margin: 0;
width: calc(100% - 10px);
padding: 0 5px;
.warn_table_li {
width: 100%;
height: 3.0625rem;
background: #062B57;
font-size: 1rem;
color: #D7E9EE;
margin-bottom: 1.5rem;
&:hover{
cursor: pointer;
background: #143C6C;
}
&:last-child{
margin-bottom: 0;
}
img{
width: 1.5rem;
height:1.5rem;
margin-left: 0.8125rem;
margin-right: 1.0625rem;
}
.flex-center-start{
font-size: 1.125rem;
}
.flex-center-end{
font-size: 1rem;
color: #D7E9EE;
span{
margin-right: 0.8125rem;
font-size: 1.25rem;
font-family: Source Han Sans SC;
font-weight: 400;
color: #FF3636;
}
.el-icon-caret-right{
color: #3FADCC;
font-size: 1rem;
margin-left: 1.25rem;
margin-right: 0.625rem;
}
}
}
}
</style>
swiper 垂直滚动的更多相关文章
- vux 使用swiper 垂直滚动文字 报错[Intervention] Ignored...
[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example becaus ...
- Android TextView多行垂直滚动
在Android应用中,有时候需要TextView可以垂直滚动,今天我就介绍一下怎么实现的.在布局里: <TextView android:id="@+id/tvCWJ" a ...
- js实现的新闻列表垂直滚动实现详解
js实现的新闻列表垂直滚动实现详解:新闻列表垂直滚动效果在大量的网站都有应用,有点自然是不言而喻的,首先由于网页的空间有限,使用滚动代码可以使用最小的空间提供更多的信息量,还有让网页有了动态的效果,更 ...
- 自己写一个jQuery垂直滚动栏插件(panel)
html中原生的滚动栏比較难看,所以有些站点,会自己实现滚动栏,导航站点hao123在一个側栏中,就自己定义了垂直滚动栏,效果比較好看,截图例如以下: watermark/2/text/aHR0cDo ...
- [转]jquery.vTicker(垂直滚动)
转至:http://www.w3ci.com/plugin/660.html 简介 vTicker 是一款非常小巧的 jQuery 垂直滚动插件,压缩后只有 2KB.vTicker 支持自定义滚动时间 ...
- Android自定义垂直滚动自动选择日期控件
------------------本博客如未明正声明转载,皆为原创,转载请注明出处!------------------ 项目中需要一个日期选择控件,该日期选择控件是垂直滚动,停止滚动时需要校正日期 ...
- 自定义ViewGroup实现垂直滚动
转载请表明出处:http://write.blog.csdn.net/postedit/23692439 一般进入APP都有欢迎界面,基本都是水平滚动的,今天和大家分享一个垂直滚动的例子. 先来看看效 ...
- javascript焦点图之垂直滚动
html代码布局,需要用到定位,不细说了 <!DOCTYPE html> <html lang="en"> <head> <meta ch ...
- TextSwitcher实现文本自动垂直滚动
实现功能:用TextSwitcher实现文本自动垂直滚动,类似淘宝首页广告条. 实现效果: 注意:由于网上横向滚动的例子比较多,所以这里通过垂直的例子演示. 实现步骤:1.extends TextSw ...
- Tkinter Scrollbar(垂直滚动部件)
Python GUI - Tkinter Scrollbar:这个小工具提供了一个幻灯片控制器,用于实现垂直滚动部件,如列表框,文本和帆布.请注意,您还可以创建进入部件的水平滚动条 这个小工具提供 ...
随机推荐
- 新员工一口气写完了这些C语言例子,领导给他转正了!
持续更新中... 很多想从事嵌入式Linux开发的老铁问一口君,有没有快速提升自己编程水平的小例子? 一口君根据自己多年工作经验,整理了一些基于Linux的c语言的非常实用的小例子, 这些例子在嵌入式 ...
- 【CMake系列】09-cmake install 一般文件 文件夹 代码文件
上一节,我们学习了项目构建后.目标的安装,本节学习的内容是 对于一般文件,文件夹以及源代码的安装 本节的文件依然使用 file(WRITE xxx.xx) 来创建,不依赖额外的文件 本专栏的实践代码全 ...
- TwinCAT3 - 实现自己的Tc2_SerialCom
目录 1,前言 2,原生Tc2_SerialCom简单使用 3,实现自己的Tc2_SerialCom 3.1,EL6inData22B,EL6outData22B 3.2,ComBuffer 3.3, ...
- 开源项目管理工具 Plane 安装和使用教程
说到项目管理工具,很多人脑海中第一个蹦出来的可能就是 Jira 了.没错,Jira 确实很强大,但是...它也有点太强大了,既复杂又昂贵,而且目前也不再提供私有化部署版本了. 再说说飞书,作为国产之光 ...
- PlugIR:开源还不用微调,首尔大学提出即插即用的多轮对话图文检索 | ACL 2024
即插即用的PlugIR通过LLM提问者和用户之间的对话逐步改进文本查询以进行图像检索,然后利用LLM将对话转换为检索模型更易理解的格式(一句话).首先,通过重新构造对话形式上下文消除了在现有视觉对话数 ...
- 学习笔记:robots.txt文件
1.1 介绍 robots.txt文件是一种用于指导搜索引擎爬虫在网站上哪些页面可以被抓取,哪些页面不应该被抓取的文本文件.这个文件通常放置在网站的根目录下. 1.2 由来 robots.txt标准最 ...
- 忘记 mysql 8.0 root 密码 怎么修改
本文copy自 Centos7重置Mysql 8.0.1 root 密码 问题产生背景: 安装完 最新版的 mysql8.0.1后忘记了密码,向重置root密码:找了网上好多资料都不尽相同,根据自己的 ...
- Mongodb入门5
最近在用MongoDBKoa2做个小项目,记录一下: 首先,如何连接线上数据库: const url = `mongodb://user:pwd@ipaddr:27017/Blog`; const m ...
- QT6跨平台开发
QT6跨平台开发 使用AI技术辅助生成 QT界面美化视频课程 QT性能优化视频课程 QT原理与源码分析视频课程 QT QML C++扩展开发视频课程 免费QT视频课程 您可以看免费1000+个QT技术 ...
- 【赵渝强老师】Oracle数据库的内存结构
首先,我们通过一张图片来了解一下Oracle数据库的内存结构,如下: 每个数据库实例有两个关联的内存结构-系统全局区(SGA),程序全局区(PGA). 系统全局(SGA):一组共享的内存结构(称为SG ...