Created
March 27, 2020 20:26
-
-
Save ShaggyTech/c7d11bada8657181ee8d1e3c1da7b3db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <v-card | |
| v-for="category in categories" | |
| :key="category.idCategory" | |
| class="mx auto" | |
| max-width="344" | |
| > | |
| <v-img class="white--text align-end" :src="category.strCategoryThumb"> | |
| <v-card-title>{{ category.strCategory }}</v-card-title> | |
| </v-img> | |
| <v-card-subtitle class="pb-0">{{ | |
| category.strCategoryDescription | |
| }}</v-card-subtitle> | |
| </v-card> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'Categories', | |
| data() { | |
| return { | |
| categories: [] | |
| }; | |
| }, | |
| created() { | |
| this.getCategories(); | |
| }, | |
| methods: { | |
| getCategories() { | |
| const categories = [ | |
| { idCategory: 1, strCategory: 'test1' }, | |
| { idCategory: 2, strCategory: 'test2' }, | |
| { idCategory: 3, strCategory: 'test3' } | |
| ]; | |
| this.categories = categories; | |
| } | |
| } | |
| }; | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment