0.2.2 • Published 5 years ago

dy-wheel-rem v0.2.2

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

dy-wheel-rem

Project setup

npm install

Project Usage

1、load all

import Wheel from 'dy-wheel-rem'

2、load compoment

import { Wheel } from 'dy-wheel-rem'
import 'dy-wheel-rem/lib/dy-wheel-rem.css';
Vue.use(Wheel)

in your vue compoment ,for example

app.vue

...
    <div>
        <d-wheel></d-wheel>
    </div>
    
    or like this
    
        <div>
            <d-wheel
                api='http://yourapi.com'
                @prizeConfig="config"
            ></d-wheel>
        </div>
        
    for more information about config, look at below~~    
...

##API

In the first version, d-wheel works on your local env, but i open the api feature, that alow you send request to server

api: your api
prizeConfig: your prize config, is array, length is equal 8

[
    {
        img: your prize image,
        position: '1',
        title: '奖励1'
    },
    {
        img: your prize image,
        position: '2',
        title: '奖励2'
    },
    ...
]

events: capture return prize object

        <div>
            <d-wheel
                api='http://yourapi.com'
                @prizeConfig="config"
                @prize-result="onPlayFinished"
            ></d-wheel>
        </div>

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

Run your unit tests

npm run test:unit

Customize configuration

See Configuration Reference.

0.2.2

5 years ago

0.2.1

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago