wip: add to cart btn, haptic touch

This commit is contained in:
Nikita Kiselev
2025-07-22 23:44:01 +03:00
parent 06a6dca656
commit 6a14ad0a74
3 changed files with 16 additions and 3 deletions

View File

@@ -33,6 +33,8 @@ const btnClassList = computed(() => {
function inc() {
if (props.disabled) return;
window.Telegram.WebApp.HapticFeedback.selectionChanged();
if (props.max && model.value + 1 > props.max) {
model.value = props.max;
return;
@@ -44,6 +46,8 @@ function inc() {
function dec() {
if (props.disabled) return;
window.Telegram.WebApp.HapticFeedback.selectionChanged();
if (model.value - 1 >= 1) {
model.value--;
}