=============
基于 Vue.js 的轮播组件
npm install --save @zee.kim/vue-swipe
首先在项目的入口文件中引入, 调用 Vue.use 全局安装组件。
import vueSwipe from '@zee.kim/vue-swipe'
Vue.use(vueSwipe)
<div id="app">
<swipe
:autoplay="autoplay"
:width="width"
:height="height"
:items="items"></swipe>
</div>
export default {
data() {
return {
autoplay:true,
width: window.innerWidth,
height: 200,
items: [
"http://domain/xxx.jpg",
"http://domain/xxx.jpg"
]
};
}
}