feat: add custom BottomButton instead of TG

This commit is contained in:
Nikita Kiselev
2025-07-21 00:48:34 +03:00
parent c282b6ea3b
commit b0cc0237af
4 changed files with 90 additions and 32 deletions

View File

@@ -23,5 +23,21 @@ export const useCartStore = defineStore('cart', {
options: options,
});
},
removeProduct(productId) {
this.items.splice(this.items.indexOf(productId), 1);
},
getQuantity(productId) {
if (this.hasProduct(productId)) {
return this.getProduct(productId).quantity;
}
return 0;
},
setQuantity(productId, quantity) {
this.getProduct(productId).quantity = quantity;
}
},
});