# @mu-ui/mu-rotary

> rotary vue component for vue 2.x

Latest version **0.1.5** (published 2019-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mu-ui/mu-rotary
pnpm add @mu-ui/mu-rotary
yarn add @mu-ui/mu-rotary
bun add @mu-ui/mu-rotary
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2019-03-09 |
| First published | 2018-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JR93 |
| Maintainers | jr93 |
| Keywords | rotary, vue, components |

## Links

- npm: https://www.npmjs.com/package/@mu-ui/mu-rotary
- npm.io page: https://npm.io/package/@mu-ui/mu-rotary

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.1.5 (latest) — 2019-03-09
- 0.1.4 — 2018-12-29
- 0.1.3 — 2018-12-15
- 0.1.2 — 2018-12-15
- 0.1.1 — 2018-12-03
- 0.1.0 — 2018-12-01

## README

## mu-rotary

rotary vue component for vue 2.x

### Installation

```bash
yarn add @mu-ui/mu-rotary
```

### Usage

```js
import Rotary from '@mu-ui/mu-rotary'

Vue.component('rotary', Rotary)

<rotary class="rotary-main" @handle="draw" @finish="showResult">
  <div slot="canvas" class="rotary-canvas">
    <div class="rotary-lamp"></div>
  </div>
  <div slot="handler" class="rotary-handler"></div>
</rotary>

...
methods: {
  draw($result) {
    setTimeout(() => {
      this.lucky = Math.floor(Math.random() * 8)
      $result.set(this.lucky) // [0,7]
      // $result.free() // Call this method to release free state of rotary when error
    }, 500)
  },
  showResult() {
    console.log(`恭喜抽中: ${this.gifts[this.lucky].name}`)
  }
}
```

### Options

#### turnsCount

Type: Number
Default: 3

turns count for per game by default, then it will find the position of the result you setted

#### duration

Type: Number
Default: 6

duration time for per game

#### number

Type: Number
Default: 8

the number of prizes

---
_Source: https://npm.io/package/@mu-ui/mu-rotary · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
