vue滑块组件_H5的轻微Vue滑块组件

Vue H5 Swiper是一个轻量级的滑块组件,依赖于better-scroll,适合H5应用。它支持长内容页面,提供丰富的分页动画效果,并优化了显示的元素数量。组件包括Swiper和SwiperItem,具有属性、事件、方法和插槽供配置和交互。
摘要由CSDN通过智能技术生成

vue滑块组件

Vue H5雨刷器 (Vue H5 Swiper)

Slight vue slider component for H5 applications.

适用于H5应用程序的轻微vue滑块组件。

特征 (Features)

  • Slight, only has better-scroll dependency.

    轻微,仅具有更好的滚动依赖性。

  • Support long content page.

    支持长内容页面。

  • A great diversity of paging animations.

    分页动画的多样性。

  • Without fake element at loop mode.

    loop模式下没有伪元素。

  • Optimized displayed SwiperItem count.

    优化显示的SwiperItem计数。

演示版 (Demos)

yarn dev

安装 (Installation)

npm install vue-h5-swiper --save

# or use yarn
yarn add vue-h5-swiper
<template>
  <swiper>
    <swiper-item>
      ...
      Content Slot
      ...
    </swiper-item>
  </swiper>
</template>

<script>
import { Swiper, SwiperItem } from 'vue-h5-swiper';

export default {
  components: {
    Swiper,
    SwiperItem
  }
};
</script>

文献资料 (Documentation)

刷牙 (Swiper)

道具 (Props)
PropDefaultDescription
loopfalseEnable loop mode.
show-indicatortrueDisplay indicators.
page-transition'move'Paging animation. Available animations: ['move', 'fade', 'cover', 'carousel', 'scale', 'glue', 'cube', 'push', 'three']
autoplayfalseAuto slide.
interval3000Auto slide interval.
Struts 默认 描述
loop false 启用循环模式。
show-indicator true 显示指示器。
page-transition 'move' 分页动画。 可用的动画: ['move', 'fade', 'cover', 'carousel', 'scale', 'glue', 'cube', 'push', 'three']
autoplay false 自动滑动。
interval 3000 自动滑动间隔。
大事记 (Events)
EventParamsDescription
beforeChangeactiveIndex, oldIndexBefore paging hook.
afterChangeactiveIndex, oldIndexAfter paging hook.
事件 参数 描述
beforeChange activeIndexoldIndex 分页之前的钩子。
afterChange activeIndexoldIndex 分页后挂钩。
方法 (Methods)
MethodDescription
moveTo(index)Move to the specified page.
next()Move to next page.
prev()Move to previous page.
方法 描述
moveTo(index) 移至指定页面。
next() 移至下一页。
prev() 移至上一页。
插槽 (Slots)
SlotDescription
default---------For SwiperItem.
indicator-------Custom swiper indicator.
插槽 描述
默认 - - - - - 对于SwiperItem
指示符 - - - - 自定义滑动指示器。

刷卡器 (SwiperItem)

插槽 (Slots)
SlotDescription
default---------For display content.
插槽 描述
默认 - - - - - 用于显示内容。

翻译自: https://vuejsexamples.com/slight-vue-slider-component-for-h5/

vue滑块组件

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值