1.0.4 • Published 4 years ago

v-lottery v1.0.4

Weekly downloads
17
License
-
Repository
github
Last release
4 years ago

v-lottery

How To Use

ES6

npm install v-lottery -S
<template>
    <div class="wrapper">
        <div id="app">
            <v-lottery :items="items" @click="clickHandler"></v-lottery>
        </div>
    </div>
</template>
import Vue from 'vue'
import vLottery from 'v-lottery'

Vue.use(vLottery)

export default {
    name: 'app',
    methods: {
        clickHandler(start) {
            setTimeout(() => {
                const resNum = Math.floor(Math.random() * 8)
                console.log(resNum)
                start(resNum, () => {
                    console.log('end')
                })
            }, 1000)
        }
    }
}

图例

gif录制效果有误差 摊手.png

image

1.0.4

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago