Skip to content
基于vue2.x实现的一个焦点图组件,提供基本的自动播放,点击跳转,无限循环滑动功能
JavaScript Vue HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
config
src
static
.babelrc
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.postcssrc.js
LICENSE
README.md
index.html
package-lock.json
package.json

README.md

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
    }
  }
You can’t perform that action at this time.