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 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({
6061const 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 */
6566const emitRemove = () => {
66- emit (" remove" , props .product );
67+ isRemoving .value = true ;
68+ emit (" remove" , props .product .key );
6769};
6870 </script >
6971
You can’t perform that action at this time.
0 commit comments