@kengic/uni 0.6.3-beta.14 → 0.6.3-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ import { Kg } from '../util';
3
3
  import { KG_DYNAMIC_QUERY_OPERATOR, KG_HTTP_HEADERS } from '../const';
4
4
  import { useKgWarehouse } from '../component/KgWarehouse/index.hooks';
5
5
  import { useKgStation } from '../component/KgStation';
6
+ import { isNil } from 'lodash-es';
6
7
 
7
8
  /*
8
9
  * 对请求做统一的拦截.
@@ -179,7 +180,8 @@ const _httpClient: IHttpClient = {
179
180
  if (['POST', 'PUT', 'DELETE'].includes(method) && params) {
180
181
  try {
181
182
  const queryString = Object.keys(params)
182
- // @ts-ignore
183
+ // 值为 null/undefined 的参数, 不需要放到 query 参数中去,
184
+ .filter((i) => !isNil(params[i]))
183
185
  .map((i) => i + '=' + params[i])
184
186
  .join('&');
185
187
  if (queryString) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/uni",
3
- "version": "0.6.3-beta.14",
3
+ "version": "0.6.3-beta.15",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "------ -------------------------------------------": "",