Giter Club home page Giter Club logo

vue-lottery's Introduction

vue-lottery

在线演示地址: https://venler.github.io/demo/vue-lottery/index.html

How To Use

ES6

npm install vue-lottery --save
import lottery from 'vue-lottery'
Vue.use(lottery)

调用示例

<lottery
    @lotteryClick="lotteryClick"
    @lotteryDone="lotteryDone"
    :lottery-start="0"
    :lottery-prizenum="8"
    :lottery-prizeno="1"
    lottery-bg="https://venler.github.io/demo/vue-lottery/dist/turnplate-bg.png"
    content-bg="https://venler.github.io/demo/vue-lottery/dist/turntable.png"
    pointer-bg="https://venler.github.io/demo/vue-lottery/dist/pointer.png"
    :lottery-width="['85%','35%']"
/>

props说明

参数名 参数类型 解释 是否必传
lottery-prizenum Number 奖品总数量
lottery-prizeno Number 从起点开始逆时针算,中奖的是第几个
lottery-bg String 背景图
content-bg String 内容区域背景图
pointer-bg String 指针背景图
lottery-start Number 0为停止,1为开始转动
lotteryDone Function 旋转完成后的回调函数
lotteryClick Function 点击抽奖按钮的回调
lottery-width String 内外圈间距百分比

vue-lottery's People

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.