Enhance CartItem component with non-selectable elements
- Updated quantity control buttons and display in CartItem.vue to include the 'select-none' class, preventing text selection during user interaction.
This commit is contained in:
@@ -132,20 +132,20 @@ const placeholderImage = '/img/makerspace-jk-2025.jpg'
|
||||
<!-- Bottom Row: Quantity Controls (left) + Subtotal (right) -->
|
||||
<div class="flex items-center justify-between mt-4">
|
||||
<!-- Quantity Controls -->
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex items-center gap-2 select-none">
|
||||
<!-- Decrease Button -->
|
||||
<Button variant="outline" size="icon" class="h-8 w-8 text-white border-white/20 hover:bg-white/10"
|
||||
<Button variant="outline" size="icon" class="h-8 w-8 text-white border-white/20 hover:bg-white/10 select-none"
|
||||
:disabled="loading || localQuantity <= 1" @click="decreaseQuantity">
|
||||
<Minus class="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
<!-- Quantity Display -->
|
||||
<div class="flex h-8 w-16 items-center justify-center rounded-md border border-white/20 bg-white/5 text-sm font-medium text-white">
|
||||
<div class="flex h-8 w-16 items-center justify-center rounded-md border border-white/20 bg-white/5 text-sm font-medium text-white select-none">
|
||||
{{ localQuantity }}
|
||||
</div>
|
||||
|
||||
<!-- Increase Button -->
|
||||
<Button variant="outline" size="icon" class="h-8 w-8 text-white border-white/20 hover:bg-white/10"
|
||||
<Button variant="outline" size="icon" class="h-8 w-8 text-white border-white/20 hover:bg-white/10 select-none"
|
||||
:disabled="loading || localQuantity >= item.product.stockQuantity" @click="increaseQuantity">
|
||||
<Plus class="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user