Package Exports
- vue-input-facade
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-input-facade) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Vue Input Facade
A lightweight and dependency free input masking library created specific for Vue
Installing
npm i vue-input-facadeyarn add vue-input-facadeImporting
Globally
Installs the component, directive and filter for your entire application.
import InputFacade from 'vue-input-facade'
Vue.use(InputFacade)Locally
Install per component as needed
import { InputFacade, facade, filter } from 'vue-input-facade'
export default {
components: { InputFacade },
directives: { facade },
filters: { facade: filter },
// ... rest of component config
}Default Mask Tokens
S= alpha characters#= numerical charactersX= alpha numerical charactersA= alpha characters, transformed to uppercasea= alpha characters, transformed to lowercase\= escape any of the above characters
See the token source file for definition signature
Usage
As Component
<label>Phone Number</label>
<input-facade mask="(###) ###-####" name="phoneNumber" type="tel" />As Directive
<label>Date</label>
<input type="text" v-facade="'##/##/##'" />See demo page for more usage examples
Thanks
Thanks to Marcos Neves for the vue-the-mask component of which this vue-input-facade was originally forked from.
Contribution
You're free to contribute to this project by submitting issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests. The project uses semantic-release to release new versions, therefore all commit messages should follow conventional commits, we are using commitizen to facilitate writting the commit messages.
License
This project is licensed under MIT License