## nw-prize-wheel
转盘抽奖组件

### 使用
#### import引入
```bash
$ npm install nw-prize-wheel
//or
yarn add nw-prize-wheel
```
首先安装nw-prize-wheel组件，然后通过import的方式引入
```javascript
import PrizeWheel from 'nw-prize-wheel';

var prizeWheel = new PrizeWheel('#J_Rotate', {
    prizeQueue: [1, 3, 4, 2]
});
```

#### script标签嵌入
下载nw-prize-wheel/lib/index.js，通过script标签直接引入打包好的文件
```html
<script src="./lib/index.js"></script>
<script type="text/javascript">
    var prizeWheel = new PrizeWheel('#J_Rotate', {
        prizeQueue: [1, 3, 4, 2]
    });
</script>
```

### 旋转到指定奖项
```javascript
prizeWheel.rotateTo(1, function(){console.log("callback")})
```
测试demo详情见nw-prize-wheel/samples文件夹下

{{>main}}