Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usage of parseCurrency without global Vue plugin installation #27

Closed
johnny-dash opened this issue Aug 29, 2019 · 3 comments
Closed
Labels
feature New feature or request

Comments

@johnny-dash
Copy link

johnny-dash commented Aug 29, 2019

In our situation, we don't want to register the plugin globally as most of the pages are not using it. Therefore we go with directive solution which allows you to import this currency input on demand. However, this means we need to implement our own parseCurrency method and we can't config the default currency and locale (The default locale configuration is passed in as a parameter when the library is registered globally). When we creating our own parseCurrency function, we find that parse and createCurrencyFormat in the parseCurrency implementation is not exported.

I have created a pull request to export these two functions. #26

@dm4t2 dm4t2 changed the title Export the parse and createCurrencyFormat function Allow usage of parseCurrency without global Vue plugin installation Sep 1, 2019
@dm4t2 dm4t2 added the feature New feature or request label Sep 1, 2019
@dm4t2 dm4t2 added this to the Release 1.10.0 milestone Sep 13, 2019
@dm4t2 dm4t2 closed this as completed in 140a19f Sep 21, 2019
@dm4t2
Copy link
Owner

dm4t2 commented Sep 21, 2019

I introduced the parseCurrency API method in release 1.10.0 which can be used without global Vue plugin installation.

https://dm4t2.github.io/vue-currency-input/api/#methods

@Nutcracker52
Copy link

@dm4t2 seems to be this parseCurruncy method is depreciated what you call this function in 1.17.3 and version 3?
this is how i Used to access it in older vertions
image

@kashiif
Copy link

kashiif commented Oct 3, 2022

@Nutcracker52 You can use the parse() as :

import { parse } from 'vue-currency-input';

...
parse(str, { locale, currency });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants