Vue-easy-slider

一个 Vue.js 的轮播组件

暂无中文翻译,

Intro

vue-easy-slider is a slider component of Vue.js.

Demo

fiddle

Install

$ npm install --save vue-easy-slider

Usage

Work on a Vue instance:

import { Slider, SliderItem } from 'vue-easy-slider'

new Vue( {
  el: 'body',
  components: {
    Slider,
    SliderItem
  }
} )
<slider width="800px"
        animation="fade"
        :interval="1000"
        :speed="1000">
  <slider-item :style="{ backgroundColor: '#3f51b5' }"></slider-item>
  <slider-item :style="{ backgroundColor: '#eee' }"></slider-item>
  <slider-item :style="{ backgroundColor: '#f44336' }"></slider-item>
</slider>

Props

Slider:

name type default description
width String auto The width of the slider
height String 300px The height of the slider
interval Number 3000 Delay of auto slider( auto option should be true )
speed Number 300 Speed of animation
auto Boolean true Autoplay
indicators 'center', 'left', 'right', false 'center' Show indicators on option position or hidden
control-btn Boolean true Show control button
animation String - { normal, fade } normal Change animation

Slots

SliderItem:

name description
default Item's content

usage:

<slider>
  <slider-item>
    <div>
      <img src="">
      <p></p>
      <button></button>
    </div>
  </slider-item>
</slider>

License

MIT

vue-easy-slider 暂时没有中文说明

我们期待您参与进来翻译和完善

该操作会锁定该库2天以防止其它用户重复翻译,然后会自动释放

讨论区