vue-number
v1.0.1
Published
Number input component to display currency value based on Vue.
Downloads
3
Maintainers
Readme
vue-number
Number input component to display currency value based on Vue.
Works with Vue 2.*
Installation
$ npm install vue-number --save
Install as Component
import Vue from 'vue'
export default {
name: 'App',
components: {
VueNumber
}
}
Install as Plugin
import Vue from 'vue'
import VueNumber from 'vue-number'
Vue.use(VueNumber)
Usage
Quick example
<template>
<vue-number currency="$" v-model="price"></vue-number>
</template>
<script>
import VueNumber from 'vue-number'
export default {
name: 'App',
components: {
VueNumber
},
data: () => ({
price: ''
}),
}
</script>
Currency prefix
adding currency prefix to the input by using currency
props.
<vue-number currency="$"></vue-number>
License
vue-number is open-sourced software licensed under the MIT license