fix(VnSearchbar): hotFix rollback
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
36c447772f
commit
9e8c967567
|
@ -98,25 +98,20 @@ onMounted(() => {
|
||||||
async function search() {
|
async function search() {
|
||||||
const staticParams = Object.entries(store.userParams);
|
const staticParams = Object.entries(store.userParams);
|
||||||
arrayData.reset(['skip', 'page']);
|
arrayData.reset(['skip', 'page']);
|
||||||
let filter = {
|
|
||||||
|
const filter = {
|
||||||
params: {
|
params: {
|
||||||
|
...Object.fromEntries(staticParams),
|
||||||
search: searchText.value,
|
search: searchText.value,
|
||||||
},
|
},
|
||||||
|
...{ filter: props.filter },
|
||||||
};
|
};
|
||||||
if (!searchText.value) {
|
|
||||||
filter = {
|
|
||||||
params: {
|
|
||||||
...Object.fromEntries(staticParams),
|
|
||||||
},
|
|
||||||
...{ filter: props.filter },
|
|
||||||
};
|
|
||||||
|
|
||||||
if (props.whereFilter) {
|
if (props.whereFilter) {
|
||||||
filter.filter = {
|
filter.filter = {
|
||||||
where: props.whereFilter(searchText.value),
|
where: props.whereFilter(searchText.value),
|
||||||
};
|
};
|
||||||
delete filter.params.search;
|
delete filter.params.search;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
await arrayData.applyFilter(filter);
|
await arrayData.applyFilter(filter);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue