Skip to content

Instantly share code, notes, and snippets.

@thefln
Created May 14, 2018 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefln/18f7cbe10440fab0f6ffac96f4634014 to your computer and use it in GitHub Desktop.
Save thefln/18f7cbe10440fab0f6ffac96f4634014 to your computer and use it in GitHub Desktop.
import butter from '@/buttercms';
import BuyButton from './BuyButton';
export default {
name: 'ProductList',
components: {
BuyButton,
},
data() {
return {
products: [],
};
},
methods: {
getProducts() {
butter.page.list('product')
.then((res) => {
this.products = res.data.data;
});
},
},
created() {
this.getProducts();
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment