All Projects → ankurk91 → vue-jquery-mask

ankurk91 / vue-jquery-mask

Licence: MIT license
Vue.js component for jQuery mask plugin

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue-jquery-mask

pyscissor
✂️ calculate polygon mask for netCDF/GRIB/raster
Stars: ✭ 14 (-26.32%)
Mutual labels:  masking
whitebox
White-box Analysis and Implementation Tools
Stars: ✭ 58 (+205.26%)
Mutual labels:  masking
input-mask
🎭 @ngneat/input-mask is an angular library that creates an input mask
Stars: ✭ 174 (+815.79%)
Mutual labels:  input-mask
FormatEditText
格式化输入框,可用来格式化数字、金额、号码等; FormatEditText can be used as a formatted text input box
Stars: ✭ 121 (+536.84%)
Mutual labels:  input-mask
CosmicClone
Cosmic Clone is a utility that can backup\clone\restore a azure Cosmos database Collection. It can also anonymize cosmos documents and helps hide personally identifiable data.
Stars: ✭ 113 (+494.74%)
Mutual labels:  masking
Text Mask
Input mask for React, Angular, Ember, Vue, & plain JavaScript
Stars: ✭ 8,102 (+42542.11%)
Mutual labels:  input-mask
Cleave.js
Format input text content when you are typing...
Stars: ✭ 17,098 (+89889.47%)
Mutual labels:  input-mask
js-input-masking
No description or website provided.
Stars: ✭ 37 (+94.74%)
Mutual labels:  input-mask
use-input-mask
use-input-mask.now.sh
Stars: ✭ 17 (-10.53%)
Mutual labels:  input-mask
remask
A multi-mask lib
Stars: ✭ 99 (+421.05%)
Mutual labels:  input-mask
react-text-mask-hoc
A higher-order text-mask component decorator for React and React Native.
Stars: ✭ 18 (-5.26%)
Mutual labels:  input-mask
keras-trans-mask
Remove and restore masks for layers that do not support masking
Stars: ✭ 17 (-10.53%)
Mutual labels:  masking
busy-load
A flexible loading-mask jQuery-plugin
Stars: ✭ 76 (+300%)
Mutual labels:  masking
Litrato
Android photo editing app with various filters and tools. Included advanced features like masking, histogram, color picker, EXIF viewer...
Stars: ✭ 54 (+184.21%)
Mutual labels:  masking
GeoUtils
Class-based handling of georeferenced raster and vector data
Stars: ✭ 32 (+68.42%)
Mutual labels:  masking
fastremap
Remap, mask, renumber, unique, and in-place transposition of 3D labeled images. Point cloud too.
Stars: ✭ 29 (+52.63%)
Mutual labels:  masking

Vue jQuery Mask Component

downloads npm-version github-tag license

Vue.js component for jQuery Mask Plugin

Demo on JSFiddle

Version matrix

Vue.js version Package version Branch
2.x 1.x 1.x
3.x 2.x master

Requirements

  • jQuery >=1.7.0
  • Vue 3.x

Installation

# Yarn
yarn add vue-jquery-mask

# npm
npm install vue-jquery-mask

Using Webpack?

// webpack.config.js
plugins: [
    new webpack.ProvidePlugin({     
      jQuery: 'jquery',
      'window.jQuery': 'jquery',
      $: 'jquery',     
    }),
  ]  

Usage Example

<template>
  <div>
    <vue-mask 
        class="form-control" 
        v-model="date"  
        mask="00/00/0000" 
        :raw="false"
        :options="options"> 
    </vue-mask>
  </div>
</template>

<script>
  // Import this component
  import vueMask from 'vue-jquery-mask';
  
  export default {    
    data () {
      return {
        date: null,
        options: {
          placeholder: '__/__/____',
          // http://igorescobar.github.io/jQuery-Mask-Plugin/docs.html
        }       
      }
    },
    components: {
      vueMask
    }
  }
</script>

As plugin

  import {createApp} from 'vue';
  import VueMask from 'vue-jquery-mask';
  const app = createApp().mount('#app')   
  app.use(VueMask);

This will register a global component <vue-mask>

Available props

The component accepts these props:

Attribute Type Default Required? Description
v-model String / null null true Set or Get input value
mask String / Function true Masking pattern
options Object {} false Configuration options
raw Boolean true false When set to false; emits formatted value with format pattern and delimiters

Install in non-module environments (without webpack)

<!-- Vue js -->
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<!-- Lastly add this package -->
<script src="https://cdn.jsdelivr.net/npm/vue-jquery-mask@2"></script>
<!-- Register global component -->
<script>
// Your app init logic may go here
app.use(VuejQueryMask)
</script>

Run examples on your localhost

  • Clone this repo
  • You should have node-js >=10.13 and yarn >=1.x pre-installed
  • Install dependencies - yarn install
  • Run webpack dev server - yarn start
  • This should open the demo page at http://localhost:9000 in your default web browser

Changelog

Please see CHANGELOG for more information what has changed recently.

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].