1.0.3 • Published 5 years ago

vue-multi-mask-component v1.0.3

Weekly downloads
39
License
MIT
Repository
github
Last release
5 years ago

Vue-phone-mask-component(RU/EN)

Vue.js multi phone mask component. Just start typing the number and the phone mask will apply automatically.

Russian and English support(see Properties section).

Preview

Install

npm i vue-multi-mask-component

Usage

// import the component
import PhoneMask from 'vue-multi-mask-component'

// register it in your app
new Vue({
  el: '#app',
  components: {PhoneMask}
})

// add component to the template with v-model="value" to sync the value with your data
<template>
  <PhoneMask v-model="value"></PhoneMask>
</template>

Properties and handlers

Property/handlerRequiredTypeDefaultDescription
@changefalseMethod--Set handler for changes
langfalseStringRUSet language RU/EN.
showRegionfalseBooleantrueShow region name

Example:

// set component language to english
<PhoneMask lang="EN"></PhoneMask>

Styling

Component class name is 'vue-multi-mask-component'

// template structure
<div class="vue-multi-mask-component">
    <input></input>  // phone input
    <p></p>          // region data
</div>

Dependencies

Inputmask

Based on

Based on jQuery inputmask-multi plugin

License

This project is licensed under MIT License