Vue currency input/directive mask
npm install v-money-persian- Lightweight (<2KB gzipped)
- Dependency free
- Mobile support
- Component or Directive flavors
- Accept copy/paste
- Editable
For other types of mask, use vue-the-mask
``js
import Vue from 'vue'
import money from 'v-money-persian'
// register directive v-money and component
Vue.use(money, {precision: 4})
`
`html
`
to bind works properly.
`html
{{price}}
``| property | Required | Type | Default | Description |
|-----------|----------|---------|---------|---------------------------------------------------------|
| precision | true | Number | 2 | How many decimal places |
| decimal | false | String | "." | Decimal separator |
| thousands | false | String | "," | Thousands separator |
| prefix | false | String | "" | Currency symbol followed by a Space, like "R$ " |
| suffix | false | String | "" | Percentage for example: " %" |
| masked | false | Boolean | false | If the component output should include the mask or not |
- https://en.wikipedia.org/wiki/Decimal_mark
- https://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html
- http://www.xe.com/symbols.php
- https://github.com/kevinongko/vue-numeric
- https://github.com/plentz/jquery-maskmoney