$ npm install vue-currency-by-country
For Demo, you can see: https://kokim2022.github.io/vue-currency-by-country/
<script lang="ts">
import { defineComponent, ref } from 'vue';
import VueCurrencyByCountry, { CurrencyOption } from "vue-currency-by-country";
import "vue-currency-by-country/style.css"
export default defineComponent({
components: { VueCurrencyByCountry },
setup() {
const currencyByCountry = ref<CurrencyOption>({
country_name: "",
currency_name: "",
country_flag: "",
currency_short: '',
currency_symbol: ''
});
return {
currencyByCountry
};
},
})
</script>
<template>
<div>
<VueCurrencyByCountry v-model="currencyByCountry" />
</div>
</template>
interface CurrencyOption {
country_flag: string;
country_name: string;
currency_short: string;
currency_name: string;
currency_symbol: string;
}
MIT@kokim2020.