Swiper中文论坛
标题:
SWIPER4直接在VUE项目中引用
[打印本页]
作者:
chinawuyi
时间:
2019-2-25 15:35
标题:
SWIPER4直接在VUE项目中引用
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
<title>首页</title>
<link rel="stylesheet" href="static/swiper.min.css">
<script src="static/swiper.min.js"></script>
<script type="text/javascript">
。。。。
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(img,index) in filePath" :key="index">
<img :src="img" height="auto" width="100%" alt="">
<div class="pageNum">{{index+1}}/{{filePath.length}}</div>
</div>
</div>
</div>
。。。。。
var mySwiper = new Swiper('.swiper-container', {
autoHeight: true, //enable auto height
spaceBetween: 20,
autoplay:false
});
作者:
chinawuyi
时间:
2019-2-25 15:35
可以不用 cnpm install swiper就可以了
作者:
chinawuyi
时间:
2019-2-26 17:42
暂暂暂暂暂暂暂暂暂暂暂暂暂
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2