Open sdwru opened 4 years ago
Yup, is true. I ran into the same issue. The solution I found was to watch directly the form with the card data usign the "deep" property like this:
form: { deep:true, handler: function handler(newV, oldV) { this.$emit('dataChanged', newV); } }
just add it to your VCreditCard.ums.js and VCreditCard.common.js files within the watch property, and now listen to the dataChanged
event like you normally do, <VCreditCard @dataChanged="dataChange"/>
, you can now define the dataChange
method within the parent component and do whatever you need with your data.
Hope it helps!
For some reason
@change
is not working. If I leave everything else the same and change it to@cardChanged
it starts working on console.log showing the card type as soon as I start typing in numbers. So it's just@change
that doesn't work. I don't see any errors in the chrome developer console or vue console.I tried registering globally and locally.
I am running
npm run serve
for http access.I tried going into the compiled dist code and adding console.log to the computed and watcher function. Neither of them appear to fire.