Skip to content

This is wrapper input to only type number and limit decimal length component for vue 2

Notifications You must be signed in to change notification settings

kinanson/vue-txt-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue input number

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.

Demo

install

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

usage

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>

props

  • key-length:default is'not limit
  • decimal-length:default can't key deciaml and dot
  • allow-negative:default is allow

events

  • tab
  • enter

About

This is wrapper input to only type number and limit decimal length component for vue 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages