GithubHelp home page GithubHelp logo

edgarallanzp / vue-h5-swiper Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 8.0 1.56 MB

Slight vue slider component for H5 applications.

Home Page: https://edgarallanzp.github.io/vue-h5-swiper/

License: MIT License

JavaScript 12.13% Vue 45.08% CSS 42.79%

vue-h5-swiper's Introduction

hero

Vue H5 Swiper

Slight vue slider component for H5 applications.

npm npm

Features

  • Slight, only has better-scroll dependency.
  • Support long content page.
  • A great diversity of paging animations.
  • Without fake element at loop mode.
  • Optimized displayed SwiperItem count.

Demos

Online demo: https://edgarallanzp.github.io/vue-h5-swiper/

Or

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

Prop Default Description
loop false Enable loop mode.
show-indicator true Display indicators.
page-transition 'move' Paging animation. Available animations: ['move', 'fade', 'cover', 'carousel', 'scale', 'glue', 'cube', 'push', 'three']
autoplay false Auto slide.
interval 3000 Auto slide interval.

Events

Event Params Description
beforeChange activeIndex, oldIndex Before paging hook.
afterChange activeIndex, oldIndex After paging hook.

Methods

Method Description
moveTo(index) Move to the specified page.
next() Move to next page.
prev() Move to previous page.

Slots

Slot Description
default For SwiperItem.
indicator Custom swiper indicator.

SwiperItem

Slots

Slot Description
default For display content.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

License

MIT

Copyright (c) 2019, Edgar Li

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.