Skip to content

Commit f075d58

Browse files
committed
Update CartItem.vue
1 parent 57ddd71 commit f075d58

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/Cart/CartItem.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* @prop {string} product.product.name - The name of the product.
4242
* @prop {number} product.quantity - The quantity of the product.
4343
* @prop {string} product.total - The subtotal of the product.
44+
* @prop {string} product.key - The unique key for the cart item.
4445
*
4546
* @emits CartItem#remove - Emitted when the remove button is clicked.
4647
*/
@@ -60,10 +61,11 @@ const props = defineProps({
6061
const emit = defineEmits(["remove"]);
6162
6263
/**
63-
* Emits a "remove" event with the `product` prop as the payload.
64+
* Emits a "remove" event with the product's key as the payload.
6465
*/
6566
const emitRemove = () => {
66-
emit("remove", props.product);
67+
isRemoving.value = true;
68+
emit("remove", props.product.key);
6769
};
6870
</script>
6971

0 commit comments

Comments
 (0)