v-lottery

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i v-lottery

Weekly Downloads

1

Version

1.0.4

License

none

Unpacked Size

752 kB

Total Files

30

Last publish

Collaborators

  • wangyajundev