antd-management-fast-framework 1.12.46 → 1.12.49

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.
@@ -61,7 +61,7 @@ var BaseNeedlessLoadDrawer = /*#__PURE__*/function (_Base) {
61
61
  _this.doOtherWhenChangeVisibleToShow = function (preProps, preState, snapshot) {
62
62
  var form = _this.getTargetForm();
63
63
 
64
- if (form == null) {
64
+ if (!form) {
65
65
  return;
66
66
  }
67
67
 
@@ -127,7 +127,7 @@ var BaseAddForm = /*#__PURE__*/function (_DataCore) {
127
127
  _this.handleFormReset = function () {
128
128
  var form = _this.getTargetForm();
129
129
 
130
- if (form == null) {
130
+ if (!form) {
131
131
  return;
132
132
  }
133
133
 
@@ -181,7 +181,7 @@ var BaseAddForm = /*#__PURE__*/function (_DataCore) {
181
181
  });
182
182
  }
183
183
 
184
- if (isFunction(afterSubmitCallback)) {
184
+ if ((0, _tools.isFunction)(afterSubmitCallback)) {
185
185
  afterSubmitCallback();
186
186
  }
187
187
  }
@@ -59,7 +59,7 @@ var BaseUpdateForm = /*#__PURE__*/function (_DataSingleView) {
59
59
  _this.handleFormReset = function () {
60
60
  var form = _this.getTargetForm();
61
61
 
62
- if (form == null) {
62
+ if (!form) {
63
63
  return;
64
64
  }
65
65
 
@@ -346,6 +346,13 @@ var ListBase = /*#__PURE__*/function (_AuthorizationWrapper) {
346
346
 
347
347
  var form = _this.getSearchCard();
348
348
 
349
+ if (!form) {
350
+ var text = '查询表单不存在';
351
+ showErrorMessage({
352
+ message: text
353
+ });
354
+ }
355
+
349
356
  var validateFields = form.validateFields;
350
357
  validateFields().then(function (fieldsValue) {
351
358
  var values = _objectSpread(_objectSpread({}, fieldsValue), {}, {
@@ -51,7 +51,7 @@ var BaseLoadModal = /*#__PURE__*/function (_Base) {
51
51
  if (_this.reloadWhenShow) {
52
52
  var form = _this.getTargetForm();
53
53
 
54
- if (form != null) {
54
+ if (form) {
55
55
  form.resetFields();
56
56
  }
57
57
 
@@ -58,7 +58,7 @@ var BaseAddModal = /*#__PURE__*/function (_Base) {
58
58
  _this.doOtherWhenChangeVisibleToShow = function (preProps, preState, snapshot) {
59
59
  var form = _this.getTargetForm();
60
60
 
61
- if (form == null) {
61
+ if (!form) {
62
62
  return;
63
63
  }
64
64
 
@@ -90,7 +90,10 @@ var MultiPage = /*#__PURE__*/function (_Base) {
90
90
  var form = _this.getSearchCard();
91
91
 
92
92
  var pageSize = _this.state.pageSize;
93
- form.resetFields();
93
+
94
+ if (form) {
95
+ form.resetFields();
96
+ }
94
97
 
95
98
  _this.handleAdditionalSearchReset();
96
99
 
@@ -116,7 +119,7 @@ var MultiPage = /*#__PURE__*/function (_Base) {
116
119
  filters = _this$state.filters,
117
120
  sorter = _this$state.sorter;
118
121
 
119
- if ((loadApiPath || '') === '') {
122
+ if ((0, _tools.stringIsNullOrWhiteSpace)(loadApiPath)) {
120
123
  var text = 'loadApiPath需要配置';
121
124
  (0, _tools.showRuntimeError)({
122
125
  message: text
@@ -126,7 +129,7 @@ var MultiPage = /*#__PURE__*/function (_Base) {
126
129
  }
127
130
 
128
131
  if (_this.restoreSearch && !!!_this.restoreSearchComplete) {
129
- if ((paramsKey || '') === '') {
132
+ if ((0, _tools.stringIsNullOrWhiteSpace)(paramsKey)) {
130
133
  var _text = 'paramsKey需要配置';
131
134
  (0, _tools.showRuntimeError)({
132
135
  message: _text
@@ -197,6 +200,13 @@ var MultiPage = /*#__PURE__*/function (_Base) {
197
200
 
198
201
  var form = _this.getSearchCard();
199
202
 
203
+ if (!form) {
204
+ var text = '查询表单不存在';
205
+ (0, _tools.showErrorMessage)({
206
+ message: text
207
+ });
208
+ }
209
+
200
210
  var validateFields = form.validateFields;
201
211
  var pageSize = _this.state.pageSize;
202
212
  validateFields().then(function (fieldsValue) {
@@ -67,7 +67,7 @@ var SinglePage = /*#__PURE__*/function (_Base) {
67
67
  _this.handleSearchReset = function () {
68
68
  var form = _this.getSearchCard();
69
69
 
70
- if ((form || null) != null) {
70
+ if (form) {
71
71
  form.resetFields();
72
72
  }
73
73
 
@@ -98,7 +98,7 @@ var SinglePage = /*#__PURE__*/function (_Base) {
98
98
  (0, _tools.showRuntimeError)({
99
99
  message: text
100
100
  });
101
- recordObject(_assertThisInitialized(_this));
101
+ (0, _tools.recordObject)(_assertThisInitialized(_this));
102
102
  return d;
103
103
  }
104
104
 
@@ -136,6 +136,13 @@ var SinglePage = /*#__PURE__*/function (_Base) {
136
136
 
137
137
  var form = _this.getSearchCard();
138
138
 
139
+ if (!form) {
140
+ var text = '查询表单不存在';
141
+ showErrorMessage({
142
+ message: text
143
+ });
144
+ }
145
+
139
146
  var validateFields = form.validateFields;
140
147
  validateFields().then(function (fieldsValue) {
141
148
  var values = _objectSpread(_objectSpread({}, fieldsValue), {}, {
package/es/utils/tools.js CHANGED
@@ -1565,7 +1565,7 @@ function cloneWithoutMethod(value) {
1565
1565
  }
1566
1566
 
1567
1567
  function isFunction(value) {
1568
- return (0, _lodash.isFunction)(value);
1568
+ return (0, _typeCheck.isFunction)(value);
1569
1569
  }
1570
1570
 
1571
1571
  function isArray(value) {
@@ -2,6 +2,7 @@
2
2
  * check value is string
3
3
  */
4
4
  export function isString(value: any): boolean;
5
+ export function isFunction(value: any): boolean;
5
6
  /**
6
7
  * 判断是否是数字字符串
7
8
  *
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.empty = empty;
7
7
  exports.isArray = isArray;
8
+ exports.isFunction = isFunction;
8
9
  exports.isNumber = isNumber;
9
10
  exports.isString = isString;
10
11
 
@@ -16,6 +17,10 @@ var _lodash = require("lodash");
16
17
  function isString(value) {
17
18
  return (0, _lodash.isString)(value);
18
19
  }
20
+
21
+ function isFunction(value) {
22
+ return (0, _lodash.isFunction)(value);
23
+ }
19
24
  /**
20
25
  * 判断是否是数字字符串
21
26
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.12.46",
3
+ "version": "1.12.49",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -118,7 +118,7 @@
118
118
  "@types/randomcolor": "^0.5.6",
119
119
  "@types/react-document-title": "^2.0.5",
120
120
  "@types/uuid": "^8.3.4",
121
- "@typescript-eslint/eslint-plugin": "^5.25.0",
121
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
122
122
  "@umijs/fabric": "^2.11.1",
123
123
  "@umijs/test": "^3.5.24",
124
124
  "@umijs/test-utils": "^3.5.24",
@@ -171,7 +171,7 @@
171
171
  "src/framework",
172
172
  "src/utils"
173
173
  ],
174
- "gitHead": "aa898b1d29770f4efd6f87598ada8cd2cb16e2a3",
174
+ "gitHead": "c53d9325e1ec1f77a4e3a2a27886dc8733df9954",
175
175
  "gitHooks": {
176
176
  "pre-commit": "lint-staged"
177
177
  }