@quansitech/antd-admin 1.1.18 → 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,16 +201,20 @@ 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
- var query = qs.parse(window.location.search.replace(/^\?/, ''));
207
- if (query && Object.keys(query).length) {
208
- Object.keys(query).forEach(function (key) {
209
- if (typeof query[key] === 'string') {
210
- /^\d+$/.test(query[key]) && (query[key] = parseInt(query[key]));
211
- }
212
- });
213
- formRef.current.setFieldsValue(query);
207
+ if (!modalContext.inModal) {
208
+ var query = qs.parse(window.location.search.replace(/^\?/, ''));
209
+ if (query && Object.keys(query).length) {
210
+ var _formRef$current2;
211
+ Object.keys(query).forEach(function (key) {
212
+ if (typeof query[key] === 'string') {
213
+ /^\d+$/.test(query[key]) && (query[key] = parseInt(query[key]));
214
+ }
215
+ });
216
+ (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 || _formRef$current2.setFieldsValue(query);
217
+ }
214
218
  }
215
219
  }, []);
216
220
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TableContext.Provider, {
@@ -255,9 +259,9 @@ export default function (props) {
255
259
  }
256
260
  // 是否立即搜索
257
261
  if (c.searchOnChange) {
258
- var _formRef$current;
262
+ var _formRef$current3;
259
263
  // @ts-ignore
260
- (_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();
261
265
  }
262
266
  }
263
267
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quansitech/antd-admin",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"