Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Apr 19, 2022. It is now read-only.
/vue-fixerPublic archive

The simple but powerful vue component for the fixer API

License

NotificationsYou must be signed in to change notification settings

eperedo/vue-fixer

Repository files navigation

The simple but powerful vue component for the fixer API

vue fixer demo

Features support

  • Latest rates endpoint
  • Convert endpoint
  • Historical rates endpoint
  • Time-Series data endpoint
  • Fluctuation data endpoint

Getting Started

First at all make sure you have a fixer API KEY. If you don't, please grab onefrom here.

Installing

npm i vue-fixer -S

Or using unpkg

<scriptsrc="https://unpkg.com/vue-fixer/dist/vueFixer.umd.min.js"></script>

Include the component

importvueFixerfrom'vue-fixer';exportdefault{name:'my-component',components:{vueFixer,// vueFixer: window.vueFixer, if you are using the UMD version},};

And now in your template

<vue-fixerapi-key="my_fixer_secret_key"/>

Events

The vue-fixer component emit aninput event giving you all the data you want.

<vue-fixerapi-key="my_fixer_secret_key"@input="myMethod"/><pre>{{fixerData}}</pre>
importvueFixerfrom'vue-fixer';functiondata(){return{fixerData:{},};}functionmyMethod(fixerData){this.fixerData=fixerData;}exportdefault{name:'my-component',components:{vueFixer,},data,methods:{myMethod,},};

Props

PropDefaultTypeDescription
api-keynoneStringThe fixer api key
featurelatestStringthe fixer feature you want to fetch
params&base=EUR&symbols=USD,PENStringquery parameters
protocolhttpStringThe http protocol you want to use
fetchingtrueBooleanFlag who determine if the request to fixer must be done right away

Events

NameDefaultValueDescription
inputnoneObjectThe fixer http response
errornoneObjectthe fixer http response error

Slots

Instead using events you can use slots and get the same result

<fixer:api-key="model.key"><divslot-scope="props"><divv-show="props.fixer.success"><header><h2>Today 1 {{ props.fixer.base }} worth</h2></header><section><ulv-for="(rate, label) in props.fixer.rates":key="rate"><li>In {{label}} = {{ rate }}</li></ul></section></div></div></fixer>

About

The simple but powerful vue component for the fixer API

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp