perf: apply search
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
parent
403159629b
commit
43bbf05adf
|
@ -115,7 +115,7 @@ async function search(evt) {
|
|||
|
||||
store.filter.where = {};
|
||||
isLoading.value = true;
|
||||
const filter = { ...userParams.value, ...$props.modelValue };
|
||||
const filter = { ...userParams.value, ...$props.modelValue, ...evt };
|
||||
store.userParamsChanged = true;
|
||||
if (excludeParams.value) {
|
||||
filter.params = {
|
||||
|
|
|
@ -126,7 +126,7 @@ async function search() {
|
|||
arrayData.resetPagination();
|
||||
|
||||
let filter = { params: { search: searchText.value } };
|
||||
if (filterPanel.value) {
|
||||
if (filterPanel?.value?.filterPanelRef) {
|
||||
filterPanel.value.filterPanelRef.search(filter);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -100,8 +100,8 @@ export function useArrayData(key, userOptions) {
|
|||
|
||||
params.filter = JSON.stringify(params.filter);
|
||||
if (fetchOptions?.exclude) {
|
||||
params = { ...params, ...fetchOptions.exclude };
|
||||
delete params.exclude;
|
||||
params = { ...params.params, ...fetchOptions.exclude };
|
||||
}
|
||||
store.isLoading = true;
|
||||
const response = await axios.get(store.url, {
|
||||
|
@ -232,7 +232,7 @@ export function useArrayData(key, userOptions) {
|
|||
if (
|
||||
params[param] === '' ||
|
||||
params[param] === null ||
|
||||
!Object(params[param]).length
|
||||
!Object.keys(params[param]).length
|
||||
) {
|
||||
delete store.userParams[param];
|
||||
delete params[param];
|
||||
|
|
Loading…
Reference in New Issue