afikderi / v-credit-card Goto Github PK
View Code? Open in Web Editor NEWBeautiful credit card form component for vueJS
License: MIT License
Beautiful credit card form component for vueJS
License: MIT License
The card layout is black and the style is not showing well.
add
@blur = "flipped = false"
in CreaditCard.vue at 'input' on line 59 would be great.
This is going to set the card view to default state (front) when click out of cvv field.
Hi, on the name input, we are setting a 20 maxLength, but on the business credit card, they can write up-to 40 words on that input. Is it possible to extend it to 40 words?
Like inputing filed on top, and Card shown at bottom?
necesito validar el campo security el CVC para que permita solo 3 digitos cuando sea TDC diferentes a american express
How do you go about adding custom validations if using as a component ?
Hey,
First of all thanks for the amazing component, looks great!
I would like to pass some extra fields to the form such as amount
, and maybe a short description
.
Are you open to PR?
Thanks!
Thanks for this. Looks like there might be a bug.
<VCreditCard ref="creditCard" @change="creditInfoChanged" />
methods: {
creditInfoChanged(values) {
console.log("good")
for (const key in values) {
this.cardInfo[key] = values[key];
}
//validate logic
this.validateCard = false;
},
}
The creditInfoChanged function is never called. That's why I put ref and now using this.$refs.creditCard.form to get values when clicked submit button.
Could you look into this?
Hello!
It would be great if I could change labels and placeholders text. I wonder if there are parameters where I can set those values or perhaps you could update the component.
Thanks!
how to add the required attribute
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.
npm list vue
+-- [email protected]
+-- [email protected]
| `-- [email protected]
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected]
+-- [email protected]
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected] deduped
`-- [email protected]
`-- [email protected] deduped
npm info v-credit-card
[email protected] | MIT | deps: 2 | versions: 14
Beautiful credit card form component for vueJS
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.
computed: {
fields: function fields() {
console.log('computed fields() fired');
return [this.form.name, this.form.cardNumber, this.form.expiration, this.form.security].join('');
}
...
...
watch: {
fields: function fields() {
console.log('@change emitter fired');
this.$emit('change', Object.assign({}, this.$data.form));
}
Very good component but how can I use trans prop? is it possible for you to give a little info or an example. thanks
Excellent component, but so far it has not been possible to retrieve a flag from the card selected for shipping.
when typing should put in the date which card is selected, master, visa ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.