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语言的非常实用的小例子, 这些例子在嵌入式 ...
- 2024-08-17:用go语言,给定一个从0开始的整数数组nums和一个整数k, 每次操作可以删除数组中的最小元素。 你的目标是通过这些操作,使得数组中的所有元素都大于或等于k。 请计算出实现这个目
2024-08-17:用go语言,给定一个从0开始的整数数组nums和一个整数k, 每次操作可以删除数组中的最小元素. 你的目标是通过这些操作,使得数组中的所有元素都大于或等于k. 请计算出实现这个目 ...
- vscode注释快捷键
单行注释 ctrl+/ 多行注释 ctrl+alt+a 文档注释 /** 复制上面一行 ctrl+d 选中段落整体向左或向右缩进 ctrl +[ 或 ctrl + ] 查找 ctrl + f
- 分库分表后全局唯一ID的四种生成策略对比
分库分表之后,ID主键如何处理? 当业务量大的时候,数据库中数据量过大,就要进行分库分表了,那么分库分表之后,必然将面临一个问题,那就是ID怎么生成?因为要分成多个表之后,如果还是使用每个表的自增长I ...
- 数据结构 - 关键路径(AOE)
数据结构 - 关键路径求解
- HEDGE: 通过特征交互检测生成文本分类的层次解释《Generating Hierarchical Explanations on Text Classification via Feature Interaction Detection》(LIME算法、神经网络预测的分层解释CD和ACD、Shapley Value夏普利值、Leave-One-Out留一法、HEDGE)
先来吐个槽:啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊,为什么我的导师又嫌我PPT做的很烂,( Ĭ ^ Ĭ ) 论文:Generating Hierarchical Explanations on Text Cl ...
- C# and TypeScript – Enum Flags
前言 以前就有提过 Enum Flags,但平日不常用.最近翻 Angular 源码,发现它很多地方用到,而且没有封装语义代码.一堆符号真的看不惯啊... 于是又去复习了一遍,熟悉熟悉.顺便写一篇做记 ...
- CSS & JS Effect – Styling Input Radio
原生 Radio 的 Limitation <input type="radio" style="width: 25px; height: 25px; cursor ...
- 30. 串联所有单词的子串 Golang实现
题目描述: 给定一个字符串 s 和一个字符串数组 words. words 中所有字符串 长度相同 . s 中的 串联子串 是指一个包含 words 中所有字符串以任意顺序排列连接起来的子串. 例如, ...
- vector<char>转string的方法
要将 std::vector<char> 转换为 std::string,可以通过 std::string 的构造函数直接从 vector 中构建字符串. 假设 std::vector&l ...