#748 |
||
|---|---|---|
| .. | ||
| demo | ||
| test | ||
| README.en-US.md | ||
| README.md | ||
| component.js | ||
| index.vue | ||
README.en-US.md
| title | preview |
|---|---|
| Ruler | https://didi.github.io/mand-mobile/examples/#/ruler |
Slidable ruler2.2.0+
Import
import { Ruler } from 'mand-mobile'
Vue.component(Ruler.name, Ruler)
Code Examples
API
Ruler Props
| Props | Description | Type | Default | Note |
|---|---|---|---|---|
| v-model | current value | Number | 0 | - |
| scope | ruler scope | Number[] | [0, 100] | - |
| step | each large distance of the scale | Number | 10 | - |
| unit | scale each small distance | Number | 1 | - |
| min | minimum | Number | 0 | - |
| max | maximum | Number | 100 | - |
| stepTextPosition2.2.1+ | step text position | String | 'top' | 'top' and 'bottom' |
| stepTextRender2.2.1+ | step text render function | Function | noop | function should return string value |
Ruler Events
@change(currentValue)
Change value