Giter VIP home page Giter VIP logo

Comments (8)

dm4t2 avatar dm4t2 commented on September 10, 2024

Have you included Vue before?

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-currency-input"></script>

Here is a working CodeSandbox example:
https://codesandbox.io/embed/vue-currency-input-direct-browser-usage-yjtci

from vue-currency-input.

shikharani16 avatar shikharani16 commented on September 10, 2024

Hi I am doing integration of Vue componenet within Dojo application.
require([
"vue/vue",
"vue/vuex",
"vue/vee-validate"
], function(Vue,Vuex,VeeValidate) {
Vue.use(Vuex);
Vue.use(VeeValidate);

Code
All these are working fine. But when I add vue-currency-input at the end
require([
"vue/vue",
"vue/vuex",
"vue/vee-validate",
"vue/vue-currency-input"
], function(Vue,Vuex,VeeValidate,VueCurrencyInput) {
It gives the error.
Attached the screenshot of vue include in application

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024

In the current release (1.5.1), the CDN link refers to an IIFE bundle that is only intended to be used directly in the browser as described in my previous comment.

I guess that your application requires a UMD bundle (that is not included in the current release). You can try an older version: https://unpkg.com/[email protected]/dist/vue-currency-input.umd.js

from vue-currency-input.

shikharani16 avatar shikharani16 commented on September 10, 2024

Hi
Thanks for the reply.With this version the load error is gone.My application is loading fine.I can see the input .js in my html.
require([
"vue/vue",
"vue/vuex",
"vue/vue-currency-input"
], function(Vue,Vuex,CurrencyInput) {
Vue.use(Vuex);
Vue.use(CurrencyInput);
In my code i have used it like

but nothing shows up in Screen. In html I can see it like

I tried using it as Directive as well
Vue.directive('currency', CurrencyInput);
but it hasnt done anything

from vue-currency-input.

shikharani16 avatar shikharani16 commented on September 10, 2024

attachmnet
CurrencyLink

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024

After installing the plugin with Vue.use() you should be able to use the <currency-input> component or v-currency directive in your app's template.

Are there any console errors?
How do you include the component?

from vue-currency-input.

shikharani16 avatar shikharani16 commented on September 10, 2024

There are no errors. I tried using it in as directive. Looks like it is not working as diective. I saw the directive demo code in github also there value is mentioned as value: '$1,234.50', so it is showing the same value. This is my fiddle
https://jsfiddle.net/xg8cyn3k/1/

from vue-currency-input.

dm4t2 avatar dm4t2 commented on September 10, 2024

The problem is that you use the the same data property for both inputs in your fiddle. The <currency-input> emits a number that will always overwrite the value in the input element using v-currency.
I edited your fiddle: https://jsfiddle.net/65rkotfq/1/

from vue-currency-input.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.