fixed some bugs and optimize codes

master
A1Gard 3 days ago
parent cf081b24fa
commit 73bc2d6b2e

@ -46,7 +46,7 @@ window.addEventListener('load', function () {
console.error('Error sending data:', error);
});
} else {
console.log('Data was sent recently. Skipping this time.');
// console.log('Data was sent recently. Skipping this time.');
}

@ -17,7 +17,7 @@
{{ item[titleField] }}
</template>
<template v-else>
{{ item[titleField][xlang] }}
{{ item[titleField]?.[xlang] ?? item[titleField] }}
</template>
</li>
@ -39,7 +39,7 @@
{{ item[titleField] }}
</template>
<template v-else>
{{ item[titleField][xlang] }}
{{ item[titleField]?.[xlang] ?? item[titleField] }}
</template>
<i class="ri-close-line" @click="rem(item[valueField])"></i>
</span>

@ -17,7 +17,7 @@
{{ item[titleField] }}
</template>
<template v-else>
{{ item[titleField][xlang] }}
{{ item[titleField]?.[xlang] ?? item[titleField] }}
</template>
</li>
@ -39,7 +39,7 @@
{{ item[titleField] }}
</template>
<template v-else>
{{ item[titleField][xlang] }}
{{ item[titleField]?.[xlang] ?? item[titleField] }}
</template>
<i class="ri-close-line" @click="rem(item[valueField])"></i>
</span>

@ -16,7 +16,7 @@
{{ item[titleField] }}
</template>
<template v-else>
{{ item[titleField][xlang] }}
{{ item[titleField]?.[xlang] ?? item[titleField] }}
</template>
</li>
</template>
@ -39,7 +39,7 @@
{{ item[titleField] }}
</template>
<template v-else>
{{ item[titleField][xlang] }}
{{ item[titleField]?.[xlang] ?? item[titleField] }}
</template>
</option>
</select>

@ -29,7 +29,7 @@
<div class="p-2">
@if($product->stock_status == 'IN_STOCK')
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card">
class="btn btn-primary add-to-card w-100">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>

@ -3,24 +3,28 @@ import {tns} from "tiny-slider/src/tiny-slider";
var sliderSimple ;
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.SliderSimple')?.forEach(function (el) {
if (el.classList.contains('.tns-slider')){
console.log('ignore');
return 'ignore';
}
sliderSimple = tns({
container: el,
items: 1,
autoplay: true,
autoplayButton: false,
// nextButton: false,
controls: false,
autoplayHoverPause: true,
mouseDrag: true,
slideBy: 1,
autoplayTimeout: 5000,
// speed:10000,
});
});
try {
document.querySelectorAll('.SliderSimple')?.forEach(function (el) {
if (el.classList.contains('.tns-slider')){
console.log('ignore');
return 'ignore';
}
sliderSimple = tns({
container: el,
items: 1,
autoplay: true,
autoplayButton: false,
// nextButton: false,
controls: false,
autoplayHoverPause: true,
mouseDrag: true,
slideBy: 1,
autoplayTimeout: 5000,
// speed:10000,
});
});
} catch {
}
});

Loading…
Cancel
Save