# Favourites
import Favourites from "mela-store";
# Example:
<favourites
:products="products"
@move-to-cart="moveToCart"
@delete-product="deleteProductFromFavourites"
>
</favourites>
To replace native a link tags with a vue link or nuxt link, you replace the default using the available slot.
<!-- vue -->
<template v-slot:product-link="{ item }">
<VueLink :to="item.link" class="melastore-product-title">
{{ item.title }}
</VueLink>
</template>
<!-- nuxt -->
<template v-slot:product-link="{ item }">
<NuxtLink :to="item.link" class="melastore-product-title">
{{ item.title }}
</NuxtLink>
</template>
# Props
Name | Type | Default | Description |
|---|---|---|---|
| products | array | [] | An array of items/products in user's cart. |
# Slots
Name | Scopes | Description |
|---|---|---|
| product-link | item - product object | The 'Product Link' content |
# Events
Name | Arguments | Description |
|---|---|---|
| delete-product | product - selected product object | Deletes selected product from cart |
| move-to-cart | product - selected product object | Moves item from favourites to cart |
# Notes
- Object keys in products props array should satisfy default values.
← Shopping Cart Lander →