@quansitech/antd-admin 1.1.19 → 1.1.20

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.
@@ -201,17 +201,19 @@ export default function (props) {
201
201
  searchUrl = window.location.href;
202
202
  }
203
203
  if (props.defaultSearchValue !== undefined) {
204
- formRef.current.setFieldsValue(props.defaultSearchValue);
204
+ var _formRef$current;
205
+ (_formRef$current = formRef.current) === null || _formRef$current === void 0 || _formRef$current.setFieldsValue(props.defaultSearchValue);
205
206
  }
206
207
  if (!modalContext.inModal) {
207
208
  var query = qs.parse(window.location.search.replace(/^\?/, ''));
208
209
  if (query && Object.keys(query).length) {
210
+ var _formRef$current2;
209
211
  Object.keys(query).forEach(function (key) {
210
212
  if (typeof query[key] === 'string') {
211
213
  /^\d+$/.test(query[key]) && (query[key] = parseInt(query[key]));
212
214
  }
213
215
  });
214
- formRef.current.setFieldsValue(query);
216
+ (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.setFieldsValue(query);
215
217
  }
216
218
  }
217
219
  }, []);
@@ -257,9 +259,9 @@ export default function (props) {
257
259
  }
258
260
  // 是否立即搜索
259
261
  if (c.searchOnChange) {
260
- var _formRef$current;
262
+ var _formRef$current3;
261
263
  // @ts-ignore
262
- (_formRef$current = formRef.current) === null || _formRef$current === void 0 || _formRef$current.submit();
264
+ (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 || _formRef$current3.submit();
263
265
  }
264
266
  }
265
267
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quansitech/antd-admin",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"