Skip to content

基于vue2.x实现的一个焦点图组件,提供基本的自动播放,点击跳转,无限循环滑动功能

License

Notifications You must be signed in to change notification settings

rt-zhangxuefei/vue2-swiper

Repository files navigation

vue2-slider

it is a usefull slider component based on vue 2.x
基于vue2.x实现的一个焦点图组件,提供基本的自动播放,点击跳转,无限循环滑动功能

立即使用(How to use)

引入src/components/slider.vue组件
如果没有链接,则不需要嵌套a标签

<template>
  <div>
    <slider>
      <div v-for="(item,index) in data" :key="index">
        <a :href="item.linkUrl">
          <img :src="item.picUrl"></img>
        </a>
      </div>
    </slider>
  </div>
</template>

or need not any link

<template>
  <div>
    <slider>
      <div v-for="(item,index) in data" :key="index">
          <img :src="item.picUrl"></img>
      </div>
    </slider>
  </div>
</template>

参数(Options)

  props: {
    loop: {
      type: Boolean,
      default: true
    },
    autoPlay: {
      type: Boolean,
      default: true
    },
    interval: {
      type: Number,
      default: 4000
    },
    speed: {
      type: Number,
      default: 500
    }
  }

About

基于vue2.x实现的一个焦点图组件,提供基本的自动播放,点击跳转,无限循环滑动功能

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published