diff --git a/packages/app/src/api-client.ts b/packages/app/src/api-client.ts index bd25be8a9..e9848e2d6 100644 --- a/packages/app/src/api-client.ts +++ b/packages/app/src/api-client.ts @@ -1,3 +1,4 @@ +import { values } from 'lodash'; import { stringify } from 'querystring'; import { request } from 'umi'; @@ -28,7 +29,7 @@ class ApiClient { const proxy: any = new Proxy({}, { get(target, method, receiver) { return (params: ActionParams = {}) => { - let { associatedKey, resourceKey, filter, sorter, sort = [], ...restParams } = params; + let { associatedKey, resourceKey, filter, sorter, sort = [], values, ...restParams } = params; let url = `/${name}`; sort = sort || []; let options: any = { @@ -39,7 +40,7 @@ class ApiClient { options.params = restParams; } else { options.method = 'post'; - options.data = restParams; + options.data = values; } if (associatedKey) { url = `/${name.split('.').join(`/${associatedKey}/`)}`; diff --git a/packages/app/src/components/form.fields/filter/index.tsx b/packages/app/src/components/form.fields/filter/index.tsx index 2780e5b99..4c25213d4 100644 --- a/packages/app/src/components/form.fields/filter/index.tsx +++ b/packages/app/src/components/form.fields/filter/index.tsx @@ -30,7 +30,7 @@ export function FilterGroup(props: any) { 满足组内 {' '}