1.0.7 • Published 3 years ago

sxw-carousel v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

sxw-carousel

安装

npm install sxw-carousel --save

import Carousel from 'sxw-carousel';
import CarouselItem from 'sxw-carousel/item';

<carousel>
	<carousel-item>
		// 需定义宽和高
		<div style="width: 200px; height: 200px;">1</div>
	</carousel-item>
	<carousel-item>
		// 需定义宽和高
		<div style="width: 200px; height: 200px;">2</div>
	</carousel-item>
</carousel>

options

参数               参数名                   类型        可选值                 默认值
initialIndex       初始显示的块的缩印        Number                            0
interval           自动切换的时间间隔        Number                            3000
autoplay           是否开启自动切换          Boolean                           true
loop               是否循环显示             Boolean                            true
arrow              切换箭头的显示时机        String     always/hover/never     hover
isArrowOut         切换箭头是否移出区域      Boolean                           false
butWidth           箭头宽度                 Number                            30
butHeight          箭头高度                 Number                            30
color              箭头颜色                 String                            #fff
bgColor            箭头背景颜色             String                             #000
butSize            箭头大小                 String                             30px
1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago