Skip to content

Commit

Permalink
bug: 修复使用 useWeight 时,随机数范围异常
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoLin committed Oct 23, 2020
1 parent 7e83dd7 commit bc147e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-fortune-wheel",
"version": "0.3.2",
"version": "0.3.4",
"author": "Xiaolin Zhu",
"license": "MIT",
"bugs": {
Expand Down
3 changes: 2 additions & 1 deletion src/components/fortuneWheel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ export default {
},
// 获取随机奖品的 id
getRandomPrize() {
const prizeId = this.prizesIdArr[randomNum(0, 100 * this.decimalSpaces - 1)]
const len = this.prizesIdArr.length
const prizeId = this.prizesIdArr[randomNum(0, len - 1)]
return prizeId
},
// 获取奖品所在的角度
Expand Down

0 comments on commit bc147e7

Please sign in to comment.