
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
vue-tel-input
Advanced tools
International Telephone Input with Vue.
Checkout Demo at Codesandbox.
yarn add vue-tel-input
npm i --save vue-tel-input
Import default CSS
to your project:
import 'vue-tel-input/dist/vue-tel-input.css';
Install as a global component:
import Vue from 'vue'
import VueTelInput from 'vue-tel-input'
Vue.use(VueTelInput)
In your component:
<template>
...
<vue-tel-input v-model="phone"
@onInput="onInput">
</vue-tel-input>
...
<template>
<script>
export default {
data() {
return {
phone: '',
};
},
methods: {
/**
* @param {string} number
* the phone number inputted by user, will be formatted along with country code
* // Ex: inputted: (AU) 0432 432 432
* // number = '+61432421546'
*
* @param {Boolean} isValid
* @param {string} country
*/
onInput({ number, isValid, country }) {
console.log(number, isValid, country);
},
},
}
</script>
Property value | Type | Default value | Description |
---|---|---|---|
placeholder | string | Enter a phone number | Placeholder for the input |
disabledFetchingCountry | Boolean | false | Disable fetching current country based on IP address of user |
Property value | Arguments | Description |
---|---|---|
onInput | Object | Fires when the input changes with the argument is the object includes { number, isValid, country } |
onBlur | Fires on blur event |
# install dependencies
$ yarn/npm install
# compile demo for development
$ yarn/npm dev
# open Browser and start serve in demo
$ yarn/npm demo:open
# compile dist demo
$ yarn/npm dist:demo
# compile dist
$ yarn/npm dist
made with ❤ by Steven.
FAQs
International Telephone Input with Vue
The npm package vue-tel-input receives a total of 94,813 weekly downloads. As such, vue-tel-input popularity was classified as popular.
We found that vue-tel-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.