Skip to content

kokim2022/vue-currency-by-country

Repository files navigation

vue-currency-by-country

Vue Currency By Country

Install

$ npm install vue-currency-by-country

Usage

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>

Interfaces

interface CurrencyOption {
    country_flag: string;
    country_name: string;
    currency_short: string;
    currency_name: string;
    currency_symbol: string;
}

LICENSE

MIT@kokim2020.