File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 41
41
* @prop {string} product.product.name - The name of the product.
42
42
* @prop {number} product.quantity - The quantity of the product.
43
43
* @prop {string} product.total - The subtotal of the product.
44
+ * @prop {string} product.key - The unique key for the cart item.
44
45
*
45
46
* @emits CartItem#remove - Emitted when the remove button is clicked.
46
47
*/
@@ -60,10 +61,11 @@ const props = defineProps({
60
61
const emit = defineEmits ([" remove" ]);
61
62
62
63
/**
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.
64
65
*/
65
66
const emitRemove = () => {
66
- emit (" remove" , props .product );
67
+ isRemoving .value = true ;
68
+ emit (" remove" , props .product .key );
67
69
};
68
70
</script >
69
71
You can’t perform that action at this time.
0 commit comments