Comments (8)
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.
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);
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.
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.
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.
from vue-currency-input.
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.
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.
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)
- IOS keyboard no minus option HOT 3
- copy paste value with dot don't insert HOT 1
- vue-currency-input shows 0 value in the first row on project edit page in my Vue 3 TypeScript project HOT 1
- Starting zeros are removed to fast HOT 1
- Quasar with vue-currency-input HOT 1
- Incompatible with Nuxt 2 / Vue 2.7.14 HOT 1
- CAD is a valid A ISO 4217 currency code but it doesnt work HOT 3
- Different Results with Locale on Different Browsers HOT 1
- Unexpected autoDecimalDigits behavior in component Playground HOT 1
- Allow custom lookup strategy for input element
- wrong result (using decimal > 10) HOT 1
- Component emitted event "change" but it is neither declared in the emits option nor as an "onChange" prop. HOT 4
- Inconsistent behaviour with Firefox + Vuetify 2 HOT 2
- No emits on vue 2.7.10 & nuxt HOT 5
- Adding options watcher in Quasar example causes input to malfunction HOT 2
- When setting currency input options, getting an error saying argument type is not assignable to CurrencyInputOptions HOT 1
- Problem with attribute currencyDisplay when use Typescript HOT 3
- TypeError: undefined is not an object (evaluating 'this.numberMask.conformToMask') in IOS 12 HOT 1
- Input breaks when using watch options and autoDecimalDigits false HOT 3
- Prevent onChange event when mounted? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-currency-input.