fix(arrayData): reset
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a0b6455b4c
commit
b488a013c7
|
@ -18,7 +18,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setOptions();
|
setOptions();
|
||||||
arrayDataStore.reset(['skip']);
|
reset(['skip']);
|
||||||
|
|
||||||
const query = route.query;
|
const query = route.query;
|
||||||
const searchUrl = store.searchUrl;
|
const searchUrl = store.searchUrl;
|
||||||
|
@ -74,9 +74,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
};
|
};
|
||||||
|
|
||||||
let exprFilter;
|
let exprFilter;
|
||||||
|
|
||||||
let userParams = { ...store.userParams };
|
let userParams = { ...store.userParams };
|
||||||
|
|
||||||
if (store?.exprBuilder) {
|
if (store?.exprBuilder) {
|
||||||
const where = buildFilter(userParams, (param, value) => {
|
const where = buildFilter(userParams, (param, value) => {
|
||||||
const res = store.exprBuilder(param, value);
|
const res = store.exprBuilder(param, value);
|
||||||
|
@ -159,11 +157,10 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
if (filter) store.filter = filter;
|
if (filter) store.filter = filter;
|
||||||
|
|
||||||
let userParams = { ...store.userParams, ...params };
|
let userParams = { ...store.userParams, ...params };
|
||||||
|
|
||||||
userParams = sanitizerParams(userParams, store?.exprBuilder);
|
userParams = sanitizerParams(userParams, store?.exprBuilder);
|
||||||
|
|
||||||
store.userParams = userParams;
|
store.userParams = userParams;
|
||||||
arrayDataStore.reset(['skip', 'filter.skip', 'page']);
|
reset(['skip', 'filter.skip', 'page']);
|
||||||
|
|
||||||
await fetch({});
|
await fetch({});
|
||||||
return { filter, params };
|
return { filter, params };
|
||||||
|
@ -190,6 +187,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
store.order = order;
|
store.order = order;
|
||||||
|
reset(['skip', 'filter.skip', 'page']);
|
||||||
fetch({});
|
fetch({});
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue