v-numeric

2,809
vue
Install
npm install v-numeric
Latest Version:0.1.1
Vue:2
License:MIT
Last Updated:Jan 5, 2023
Links: GitHub  ·  npm
Maintainer: n2name

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>

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

588,019,132 54,801
vue
@vueuse/shared
372,738,348 22,398
@vueuse/core

Collection of essential Vue Composition Utilities

367,188,523 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

333,357,380 686
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591

Version History

Version Released Vue License
0.1.1 ^2.6.10 MIT
0.1.0 ^2.6.10 MIT