From 855da2b7bf83caef31d3bc35fc4ffd3194dc6db7 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 3 Feb 2025 08:46:44 +0100 Subject: [PATCH] fix: fixed VnPaginate --- src/components/ui/VnPaginate.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 965f4d5e9de..4b7e5fdfb41 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -119,7 +119,7 @@ watch( () => props.data, () => { store.data = props.data; - } + }, ); watch( @@ -128,12 +128,12 @@ watch( if (!mounted.value) return; emit('onChange', data); }, - { immediate: true } + { immediate: true }, ); watch( () => [props.url, props.filter], - ([url, filter]) => mounted.value && fetch({ url, filter }) + ([url, filter]) => mounted.value && fetch({ url, filter }), ); const addFilter = async (filter, params) => { await arrayData.addFilter({ filter, params }); @@ -194,7 +194,7 @@ function endPagination() { async function onLoad(index, done) { if (!store.data || !mounted.value) return done(); - if (store.data.length === 0 || !props.url) return done(false); + if (store.data.length === 0 || !arrayData.store.url) return done(false); pagination.value.page = pagination.value.page + 1;