vue-tel-input
International Telephone Input Boilerplate with Vue ((integrated with VueFormGenerator).
Checkout Demo at Codesandbox.
Installation
npm install --save vue-tel-input
Usage
-
As a standalone component:
Import vue-tel-input
into your Vue component and use as a normal component:
<template>
...
<tel-input></tel-input>
...
<template>
<script>
import TelInput from '../vue-tel-input'
export default {
...
components: {
TelInput
}
}
</script>
-
As a field of VueFormGenerator
-
Register vue-tel-input
as a global component:
import vueTelInput from "../vue-tel-input.vue";
...
Vue.component("fieldTelephone", vueTelInput);
!! As the naming convention for custom field in VueFormGenerator, you need to put the name of the component as: `field.
-
Now you can you it in your schema:
var schema: {
fields: [{
type: "telephone",
label: "Phone Number",
model: "phone"
}]
};
For more info: vue-form-generator/custom-fields
Highlights & Credits
Example App Build Setup
npm install
npm run dev
npm run build
npm run build --report
npm run unit
npm test
made with ❤ by Steven.