项目中使用了vue-awesome-swiper,发现autoplay不能用。网上找了半天,说是版本问题。最后在main.js中添加以下代码解决。

import VueAwesomeSwiper from 'vue-awesome-swiper';
import 'swiper/swiper-bundle.min.css';
Vue.use(VueAwesomeSwiper);
import Swiper2, {Navigation, Pagination, EffectFade, Autoplay } from 'swiper';
Swiper2.use([Navigation, Pagination, EffectFade, Autoplay]);
 
另外,swiper中的循环项目过多,导致页面卡顿,解决办法是把swiper-slide改成swiper-item。
swiperOption中的slidesPerView需要设置,否则会导致swiper计算不准,出现swiper滚动到最后出现空白的现象。
 
在这里记录一个不是swiper的问题,a标签跳转打开链接的时候会在http标头中带上引荐来源信息到目标网站,目标网站如果判断有引荐来源可能会返回404页面,可以通过给a标签添加rel="noreferrer"属性解决。
 

vue-awesome-swiper使用中的一些问题的更多相关文章

  1. vue引入swiper vue使用swiper vue脚手架使用swiper /引入js文件/引入css文件

    vue引入swiper  vue使用swiper  vue脚手架使用swiper /引入js文件/引入css文件 ------------------------------------------- ...

  2. Vue与swiper想结合封装全屏轮播插件

    项目需求介绍: 1.页面图文混排, 2.点击图片后全屏展示图片,并在底部显示文字,如果没有则不显示 3.关闭全屏后依然停留在上次浏览的位置 4.浏览图片时,不管点击的哪张图片,全屏展示的时候也要显示这 ...

  3. vue 使用swiper的一些问题(页面渲染问题)

    //Swiper上下滚动初始化 swiper_init(){ this.$nextTick(function(){ var mySwiper = new Swiper ('.swiper-contai ...

  4. vue awaresome swiper的使用

    main.jsimport VueAwesomeSwiper from 'vue-awesome-swiper'import 'swiper/dist/css/swiper.css'Vue.use(V ...

  5. 小程序和Vue利用swiper实现icons分页显示--动态计算

    这里发现小程序实现步骤,Vue与之类似 先上效果图: <view class="icons"> <swiper indicator-dots="true ...

  6. vue使用swiper模块滑动时报错:[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example becaus

    报错: vue报这个错 [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for ex ...

  7. 轮播模仿臭美APP,vue,swiper

    介绍:轮播使用了swiper,重要用于移动端滑动,详情可查看官网 1.首先用npm安装        npm install swiper 2.main.js 中引入CSS     import 's ...

  8. vue封装swiper

    参考:https://github.com/surmon-china/vue-awesome-swiper npm install vue-awesome-swiper --save 全局引入 imp ...

  9. vue添加swiper的正确方式亲测---切图网

    在vue项目中,我们在做图片轮播的方式和传统切图不同,传统切图中我们一般采用非常强大的swiper来完成,而在vue中一般依赖vue-awesome-swiper组件来完成(vue-awesome-s ...

  10. Vue整合swiper报错Could not compile template .....swiper\dist\css\swiper.css解决办法

    问题描述 今天做一个前端项目,安装幻灯片插件vue-awesome-swiper后 运行npm run dev 后报错如下: `ERROR Could not compile template E:\ ...

随机推荐

  1. windows-sam文件

    sam文件是账号密码的数据库文件 存放位置C:\Windows\System32\Config\sam

  2. angular中echart的使用

    <div class="ringlike-chart" echarts [options]="options" (chartInit)="onC ...

  3. accessservice对于难定位的view如何定位

    private static int tabcount = -1; private static StringBuilder sb; public static void printPacketInf ...

  4. 让启动的jar包能打断点

    java  -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar rbpsems-web-2.0.0-SNAP ...

  5. 开始学python不知该怎么学?Python基础教程(第2版) 免费下载

    Python基础教程(第2版)pdf高清版免费下载  解压码:n0nl   内容简介  · · · · · · 本书是经典教程的全新改版,作者根据Python 3.0版本的种种变化,全面改写了书中内容 ...

  6. NFS服务器搭建与autofs自动挂载

    一.NFS文件详解 1. /data/            表示需要共享的目录. 2. IP                表示允许哪个客户端访问. 3. IP                后括号 ...

  7. Ubuntu更换国内apt-get源

    更换方法: cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo sed -i 's/archive.ubuntu.com/mirrors.u ...

  8. 【Shell】DBeaver Enterprise Edition 5.1.1 Download

    DBeaver Enterprise Edition 5.1.1 Download mkdir -p /opt/downloads/dbeaver/dbeaver-ee-5.1.1 mkdir -p ...

  9. mysql创建存储过程造数据

    delimiter $$$ DROP PROCEDURE zqtest6; create procedure zqtest6() begin declare i int default 0; set ...

  10. NSAttributedString 多格式字符串

    NSString *aString = @"哈哈标题(必填)"; NSRange range = NSMakeRange(4, 4); //当然也可以查找NSRange range ...