html:

 <link rel="stylesheet" href="css/swiper.min.css">
 
<div class="swiper-container s-c">
<div class="swiper-wrapper"></div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
<!-- Add Arrows -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
<script src="js/swiper.min.js"></script>
 

js:

var vm = new Vue({
el:'#app',
data:{
imgs:[
{thumb:"https://goss.veer.com/creative/vcg/veer/800water/veer-308318668.jpg"},
{thumb:"https://goss.veer.com/creative/vcg/veer/800water/veer-308318668.jpg"},
{thumb:"https://goss.veer.com/creative/vcg/veer/800water/veer-308318668.jpg"},
{thumb:"https://goss.veer.com/creative/vcg/veer/800water/veer-308318668.jpg"},
{thumb:"https://goss.veer.com/creative/vcg/veer/800water/veer-308318668.jpg"},
{thumb:"https://goss.veer.com/creative/vcg/veer/800water/veer-308318668.jpg"},
], },
created: function(){ },
mounted:function(){
var self = this;
var imgs = self.imgs;
for (var i = 0, len = imgs.length; i < len; i++) {
var html = '<div class="swiper-slide"><img src="' + imgs[i].thumb + '"/></div>'
$('.swiper-wrapper').append(html)
}
var swiper = new Swiper('.swiper-container', {
pagination: {
el: '.swiper-pagination',
type: 'fraction',
},
loop: true, //为 true循环
autoplay: false, //为 true自动播放到下一张
init: true, //为true自动执行,不用调用
disableOnInteraction: false,
}); },
methods:{ },
filters:{ } })

最新文章

  1. IOS入门之Swift语言(一)
  2. win10 服务(系统默认服务)注册表
  3. Asp.Net Web Form 前后台传值
  4. Java Programming Test Question 1
  5. IOS第十天(1:QQ好友列表 ,自定义的headview,代理 ,通知 ,black的使用)
  6. JS 将字符串转换成日期类型
  7. schedule() 和 scheduleAtFixedRate() 区别
  8. log4js
  9. Ctrl+Shift+F12切换最大化编辑器
  10. Exception not a valid month
  11. Hibernate jar包详解
  12. 字符串转Json对象
  13. 一个包的net到gs流程
  14. mysql官方示例数据库
  15. STL算法
  16. [Whole Web, Node.js PM2] Loggin with PM2
  17. nutch 很多url unfetched的原因
  18. meanShift算法介绍
  19. 带有机器人框架的.NET自己主动化測试
  20. Python 递归计算分数数列

热门文章

  1. A - Wireless Network POJ - 2236-kuangbin带你飞
  2. php文件上传 form表单形式
  3. linux - mysql:安装mysql
  4. GitBook的使用方式,快速创建网页文档
  5. 题解 P5733 【【深基6.例1】自动修正】
  6. 将用户名密码邮箱制成表格,以用户名为q结束
  7. ASP.NET Identity-验证与授权及管道事件
  8. 浏览器缓存信息(Autocomplete )
  9. SPDK-nvmf与不同传输类型的公共接口
  10. (转)Hadoop Combiner