1.1.2 • Published 2 years ago

component-carousel v1.1.2

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

安装

npm install 

使用

  • 在 需要使用的文件中引入
// 引入组件
import JscyUI from "component-carousel"

// 引入样式文件
import  "component-carousel/style/carousel.css"

// 挂载
Vue.use(JscyUI)
  • 页面中使用
  // 注意: 使用时包裹改组件的盒子要给宽高
      <!-- 使用轮播组件 -->
      <carousel
        :autoplay="true"
        :duration="3000"
        :instial="0"
        :hasDot="true"
        :hasDirector="true"
      >
        <car-item v-for="(item, index) of carData" :key="index">
          <img class="item-img" :src="require(`./assets/image/${item.img_name}`)" />
        </car-item>
      </carousel>

属性说明

PropertyDeacriptiontypedefault
autoplay是否开启自动播放Booleantrue
duration滑动间隔时长Number3000
instial默认显示第几项(下标)Number0
hasDot是否显示指示器Booleantrue
hasDirector是否显示方向指示器Booleantrue
dotBgColor指示器背景色String#ff5000
dirBgColor方向指示器颜色String#fff
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago