Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue-country-code-select
Advanced tools
Country Code Select with Vue.
Checkout Demo at Github pages.
yarn add vue-country-code-select
npm i --save vue-country-code-select
Install as a global component:
import Vue from "vue";
import VueCountryCode from "vue-country-code-select";
Vue.use(VueCountryCode);
In your component:
<template>
...
<vue-country-code
@onSelect="onSelect"
<!-- optional -->
:preferredCountries="['vn', 'us', 'gb']">
</vue-country-code>
...
<template>
<script>
export default {
data() {
return {
};
},
methods: {
onSelect({name, iso2, dialCode}) {
console.log(name, iso2, dialCode);
},
},
}
</script>
Register the new field as a global component
Property value | Type | Default value | Description |
---|---|---|---|
defaultCountry | string | '' | Default country, will override the country fetched from IP address of user |
searchPlaceholderText | string | '' | Default text - "Search country" |
enableSearchField | Boolean | '' | Default "false" |
disabledFetchingCountry | Boolean | false | Disable fetching current country based on IP address of user |
enabledCountryCode | Boolean | false | Enable country code in the input |
enabledFlags | Boolean | true | Enable flags in the input |
preferredCountries | Array | [] | Preferred countries list, will be on top of the dropdown. ie ['AU', 'BR'] |
onlyCountries | Array | [] | List of countries will be shown on the dropdown. ie ['AU', 'BR'] |
ignoredCountries | Array | [] | List of countries will NOT be shown on the dropdown. ie ['AU', 'BR'] |
dropdownOptions | Object | { disabledDialCode: false } | Options for dropdown, supporting disabledDialCode |
Property value | Arguments | Description |
---|---|---|
onSelect | Object | Fires when the input changes with the argument is the object includes { name, iso2, dialCode } |
# install dependencies
$ yarn/npm install
# compile demo and start serve for development
$ yarn/npm dev
# build
$ yarn/npm build
Made by Mon.
FAQs
Country Code Select with Vue
We found that vue-country-code-select demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.