feat: add custom BottomButton instead of TG
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user