You can begin to build the product listing page and implement the categories menu as depicted in this diagram by following these next steps:
- Create the folder /src/components/market.
- Implement the CategoryMenyItem component:
- Create the file /src/components/market/CategoryMenuItem.vue
- Write the following code:
<template> <div class="container" @click="onSelected" :class="{selected: checked}"> <span>{{ categoryName }}</span> </div></template> <script>export default { name: 'CategoryMenuItem', props: { categoryName: String, checked: Boolean, }, methods: { onSelected: function() { this.$emit('selected', this.categoryName); ...