diff --git a/index.html b/index.html index f30041f2d..cffb8f504 100644 --- a/index.html +++ b/index.html @@ -26,8 +26,8 @@

{{ product }}

-
{{ variant.color }}
- +
{{ variant.color }}
+ diff --git a/main.js b/main.js index a274b91f0..fe5f42bc4 100644 --- a/main.js +++ b/main.js @@ -11,5 +11,13 @@ const app = Vue.createApp({ { id: 2235, color: 'blue', image: './assets/images/socks_blue.jpg' }, ] } + }, + methods: { + addToCart() { + this.cart += 1 + }, + updateImage(variantImage) { + this.image = variantImage + } } })