Merge pull request 'Fix[VnPaginate]: Fixed paginate' (!1319) from Fix-OrderCatalogPaginate into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1319 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
909e6674d6
|
@ -123,7 +123,7 @@ watch(
|
|||
() => props.data,
|
||||
() => {
|
||||
store.data = props.data;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
|
@ -132,12 +132,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 });
|
||||
|
@ -198,7 +198,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;
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ const catalogParams = {
|
|||
};
|
||||
const arrayData = useArrayData(dataKey, {
|
||||
url: 'Orders/CatalogFilter',
|
||||
limit: 50,
|
||||
userParams: catalogParams,
|
||||
});
|
||||
const store = arrayData.store;
|
||||
|
@ -66,7 +65,7 @@ function extractValueTags(items) {
|
|||
.filter((k) => /^value\d+$/.test(k))
|
||||
.map((v) => x[v])
|
||||
.filter((v) => v)
|
||||
.sort()
|
||||
.sort(),
|
||||
);
|
||||
tagValue.value = resultValueTags;
|
||||
}
|
||||
|
@ -76,7 +75,7 @@ watch(
|
|||
(val) => {
|
||||
extractTags(val);
|
||||
},
|
||||
{ immediate: true }
|
||||
{ immediate: true },
|
||||
);
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue