fix: fixed VnPaginate
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Jon Elias 2025-02-03 08:46:44 +01:00
parent 76ebb3beb4
commit 855da2b7bf
1 changed files with 4 additions and 4 deletions

View File

@ -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;