vue-txt-number
This is wrapper input to only type number and limit decimal length component for vue 2
Last updated 7 months ago by kinanson .
ISC · Repository · Bugs · Original npm · Tarball
$ cnpm install vue-txt-number 
SYNC missed versions from official npm registry.

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
Maintainers (1)
Downloads
Today 0
This Week 7
This Month 7
Last Day 0
Last Week 0
Last Month 14
Dependencies (1)
Dev Dependencies (19)
Dependents (0)
None

Copyright 2014 - 2018 © taobao.org |