Skip to content

Instantly share code, notes, and snippets.

@kek112
Last active October 3, 2019 09:20
Show Gist options
  • Save kek112/0fc2a8b2320b25cbd861a59285a9b74e to your computer and use it in GitHub Desktop.
Save kek112/0fc2a8b2320b25cbd861a59285a9b74e to your computer and use it in GitHub Desktop.
Vue.component('nameOfComp',
{
data: function() {
return {
product: 'Socks',
variants: [
{
variantID: 2234,
variantColor: 'green',
variantImage: '../src/assets/vmSocks-green-onWhite.jpg',
},
{
variantID: 2235,
variantColor: 'blue',
variantImage: '../src/assets/vmSocks-blue-onWhite.jpg',
},
],
};
},
template:`<html></html>`,
methods: {
doSomething: function() {this.product='Shoes'},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment