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(() => {
|
||||
setOptions();
|
||||
arrayDataStore.reset(['skip']);
|
||||
reset(['skip']);
|
||||
|
||||
const query = route.query;
|
||||
const searchUrl = store.searchUrl;
|
||||
|
@ -74,9 +74,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
};
|
||||
|
||||
let exprFilter;
|
||||
|
||||
let userParams = { ...store.userParams };
|
||||
|
||||
if (store?.exprBuilder) {
|
||||
const where = buildFilter(userParams, (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;
|
||||
|
||||
let userParams = { ...store.userParams, ...params };
|
||||
|
||||
userParams = sanitizerParams(userParams, store?.exprBuilder);
|
||||
|
||||
store.userParams = userParams;
|
||||
arrayDataStore.reset(['skip', 'filter.skip', 'page']);
|
||||
reset(['skip', 'filter.skip', 'page']);
|
||||
|
||||
await fetch({});
|
||||
return { filter, params };
|
||||
|
@ -190,6 +187,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
|||
}
|
||||
|
||||
store.order = order;
|
||||
reset(['skip', 'filter.skip', 'page']);
|
||||
fetch({});
|
||||
index++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue