vue-input-only-number

Vue 2.x input only number directive.
6,453 4
Install
npm install vue-input-only-number
Latest Version:1.1.0
Vue:2
License:MIT
Last Updated:Jul 25, 2018
Links: GitHub  ·  npm
Maintainer: k-okina

vue-input-only-number

インストール方法

npm

$ npm install vue-input-only-number

yarn

$ yarn add vue-input-only-number

intだけ入力できるようにする

import onlyInt from 'vue-input-only-number';

Vue.use(onlyInt);

<input type="text" v-int>

floatだけ入力できるようにする

import { onlyFloat } from 'vue-input-only-number';

Vue.use(onlyFloat);

<input type="text" v-float>

両方

import onlyInt, { onlyFloat } from 'vue-input-only-number';

Vue.use(onlyInt);
Vue.use(onlyFloat);

<input type="text" v-int>
<input type="text" v-float>

特徴

inputやtextareaなどで、int、又はfloatしか入力できなくなる。 主にデザイン要件を満たすために使う。

Related Packages

vue-contenteditable-input

Contenteditable directive with v-model, auto focus, preventing new line on enter...

6,798
@nylira/vue-form-msg

Form input error and desc component for Vue 2.

3,472 0
vue-r-mask

Masked input directive for vue.js 2

7,495
@odyzeo/form-item

Odyzeo form item component with Vue

3,613 1
vue-form-send

A Vue.js directive for sending data from form and primitive validation inputs

1,199 4

Version History

Version Released Vue License
1.1.0 ~2 MIT
1.0.0 ~2 MIT
0.9.0 ~2 MIT