0.1.1 • Published 4 years ago

v-numeric v0.1.1

Weekly downloads
61
License
MIT
Repository
github
Last release
4 years ago

v-numeric

bundlephobia minified size npm package version github license js standard style

Vue 2.x directive for numeric value restriction of input element.

Install

$ npm i --save v-numeric

Note

  • Support oneway update from an input element to a model.

Usage

import Vue from 'vue'
const numeric = require('v-numeric').default;

Vue.use(numeric)
  • Should use input type="text" instead of "number"
  • Should use custom 'bind' parameter instead of v-model bind
<template>
  <input 
    type="text"
    v-numeric="{ min: 0, max: 100, decimal: 2, bind: 'myData.somedata' }" />
</template>

<script>
...

  myData = {
    somedata = '';
  }

...
</script>
0.1.1

4 years ago

0.1.0

4 years ago