fix: infinity scroll, init data in base64
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
<h3 class="mt-4 text-sm">{{ product.name }}</h3>
|
||||
<p class="mt-1 text-lg font-medium">{{ product.price }}</p>
|
||||
</RouterLink>
|
||||
<div ref="bottom" style="height: 1px;"></div>
|
||||
</div>
|
||||
|
||||
<div v-if="productsStore.isLoading" class="text-center mt-5">
|
||||
@@ -57,6 +58,7 @@ const route = useRoute();
|
||||
const categoryId = route.params.category_id ?? null;
|
||||
const productsStore = useProductsStore();
|
||||
const settings = useSettingsStore();
|
||||
const bottom = ref(null);
|
||||
|
||||
function haptic() {
|
||||
window.Telegram.WebApp.HapticFeedback.selectionChanged();
|
||||
@@ -89,9 +91,9 @@ async function loadMore() {
|
||||
}
|
||||
|
||||
useInfiniteScroll(
|
||||
window,
|
||||
bottom,
|
||||
loadMore,
|
||||
{distance: 500}
|
||||
{distance: 1000}
|
||||
)
|
||||
|
||||
watch(() => route.params.id, async newId => {
|
||||
|
||||
Reference in New Issue
Block a user