Works for Vue2. This is only can key number component based on vue.js . Currently, It very simple for us.I just need limit for key length and decimal length.That also has disabled negative number.If you also need limit length input component that will be for you.
npm install vue-txt-number --save
If you not signle file vue.You can download dist file include it in html
<script src='dist/vue-txt-number.min.js'>
Above file can find in the here
You can import in the vue file like what do you usally do.
<template>
<div>
<vue-txt-number v-model="number"></vue-txt-number>
</div>
</template>
<script>
import VueTxtNumber from './components/vue-txt-number.vue'
export default {
components: {
VueTxtNumber
},
data () {
return {
number: 3
}
}
}
</script>
<style>
</style>
- key-length:default is'not limit
- decimal-length:default can't key deciaml and dot
- allow-negative:default is allow
- tab
- enter