1.0.0 • Published 1 year ago

ball-swiper v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

简介

ball-swiper。

ball-swiper

快速开始

npm i ball-swiper -S

快速应用

全局注入
import BallSwiper from 'ball-swiper'
app.use(BallSwiper);
局部注入
import { BallSwiper } from 'ball-swiper';
export default {
  name: 'App',
  components: {
    BallSwiper
  }
}

主参数

参数类型必填项默认值参考值说明
dataArray数据 - 来源。
heightString×100%高度。
showNumNumber×7展示数据量,请使用奇数值,偶数值会向上加1变成奇数结果。
itemBgString×item背景。
jtImgString×左右箭头图片。请传入左侧箭头图片,右侧箭头会自动水平反转使用。

方法

参数类型解释
@itemClick点击回调(obj) => {}。

示例

常规
<BallSwiper
  :data="data"
  @itemClick="itemClick">
  <template #default="scope">
    <div class="name">{{ scope.row.name }}</div>
    <div class="img">
      <img :src="getImageUrl(`images/moduleGuide/${scope.row.url}.png`)">
    </div>
  </template>
</BallSwiper>
1.0.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago