JSPM

  • Created
  • Published
  • Downloads 5988
  • Score
    100M100P100Q118683F
  • License MIT

Input field component to display currency value based on Vue.

Package Exports

  • vue-numeric

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-numeric) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue-numeric

npm version npm npm

Numeric input component based on Vue.

Installation

$ npm install vue-numeric --save-dev

Usage

screen shot 2016-12-08 at 2 19 31 pm

<template>
  <vue-numeric currency="$" separator="," v-model="price"></vue-numeric>
</template>

<script>
import VueNumeric from 'vue-numeric'

export default {

  name: 'App',

  components: {
    VueNumeric
  },

  data () {
    return {
      price: ''
    }
  }

}
</script>

Props

 /**
  * Default value.
  */
 default: {
   type: [String, Number],
   required: false
 },

 /**
  * Input placeholder.
  */
 placeholder: {
   type: String,
   required: false
 },

  /**
  * Number of decimals.
  * decimals symbol are the opposite of separator props
  */
 precision: {
   type: [String, Number]
   required: false
 },

 /**
  * Minimum value.
  */
 min: {
   type: [String, Number],
   required: false
 },

 /**
  * Maximum value.
  */
 max: {
   type: [String, Number],
   required: false
 },

 /**
  * Currency prefix.
  */
 currency: {
   type: String,
   required: true
 },

 /**
  * Thousand separator type.
  * Separator props accept either . or , (default)
  */
 separator: {
   type: String,
   required: false
 },

License

Vue-Numeric is open-sourced software licensed under the MIT license