1.0.2 • Published 5 years ago

@wyhaya/vue-slide v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

vue-slide

Vue carousel component for mobile

slide

Install

yarn add @wyhaya/vue-slide

Example

<template>
    <div>
        <slide :data="slide" />
    </div>
</template>

<script>
import slide from '@wyhaya/vue-slide'
export default {
    data() {
        return {
            slide: ['1.jpg', '2.jpg', '3.jpg']
        }
    },
    components: { slide }
}
</script>

Interface

PropsTypeDefaultExplain
:datastring[][]Picture list
:timenumber3000msTimed scrolling time
:spotbooleantrueWhether to display the index
:speednumber300msTransition speed
:typeease \| linear \| ease-in \| ...easeTransition mode
:clockwisebooleantrueWhether to scroll clockwise
@click(index: number) => void-Callback function after clicking
@change(index: number) => void-Change the callback function after the index
@prev(index: number) => void-Callback function after index forward
@next(index: number) => void-Callback function after index backwards

License

MIT LICENSE