tntd 1.4.4 → 1.4.5
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.
- package/components/QueryListScene/QueryForm.js +4 -4
- package/dist/stats.json +64 -64
- package/dist/tntd.js +1 -1
- package/es/QueryListScene/QueryForm.js +25 -12
- package/lib/QueryListScene/QueryForm.js +25 -12
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import Form from '../QueryForm';
|
|
3
|
+
import Form from '../QueryForm';
|
|
4
4
|
|
|
5
5
|
const clsPrefix = 'tnt-querylistscene-queryform';
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
export default class QueryForm extends React.PureComponent {
|
|
8
8
|
constructor(props) {
|
|
9
9
|
super(props);
|
|
@@ -52,7 +52,7 @@ export default class QueryForm extends React.PureComponent {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
onSearch = () => {
|
|
55
|
+
onSearch = async() => {
|
|
56
56
|
const {
|
|
57
57
|
onSearch,
|
|
58
58
|
actions
|
|
@@ -60,7 +60,7 @@ export default class QueryForm extends React.PureComponent {
|
|
|
60
60
|
const values = actions.getFormData();
|
|
61
61
|
const params = { ...values, current: 1 };
|
|
62
62
|
|
|
63
|
-
actions.setData('formData', values);
|
|
63
|
+
await actions.setData('formData', values); // memory 与 url解析setForm时 监听事件异步
|
|
64
64
|
onSearch && onSearch(params);
|
|
65
65
|
actions.emit('search', params);
|
|
66
66
|
};
|
package/dist/stats.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n main (599 KiB)\n tntd.css\n tntd.js\n"
|
|
6
6
|
],
|
|
7
7
|
"version": "4.46.0",
|
|
8
|
-
"hash": "
|
|
9
|
-
"time":
|
|
10
|
-
"builtAt":
|
|
8
|
+
"hash": "59f2bd5c70268fa38f94",
|
|
9
|
+
"time": 23048,
|
|
10
|
+
"builtAt": 1650781131360,
|
|
11
11
|
"publicPath": "",
|
|
12
12
|
"outputPath": "/Users/zhouzefei/projects/tntd/dist",
|
|
13
13
|
"assetsByChunkName": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"name": "tntd.js",
|
|
140
|
-
"size":
|
|
140
|
+
"size": 600923,
|
|
141
141
|
"chunks": [
|
|
142
142
|
0
|
|
143
143
|
],
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"rendered": true,
|
|
185
185
|
"initial": true,
|
|
186
186
|
"entry": true,
|
|
187
|
-
"size":
|
|
187
|
+
"size": 890197,
|
|
188
188
|
"names": [
|
|
189
189
|
"main"
|
|
190
190
|
],
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"tntd.css",
|
|
193
193
|
"tntd.js"
|
|
194
194
|
],
|
|
195
|
-
"hash": "
|
|
195
|
+
"hash": "05b470a22002ad284d3a",
|
|
196
196
|
"siblings": [],
|
|
197
197
|
"parents": [],
|
|
198
198
|
"children": [
|
|
@@ -2042,15 +2042,6 @@
|
|
|
2042
2042
|
"userRequest": "react",
|
|
2043
2043
|
"loc": "125:7-12"
|
|
2044
2044
|
},
|
|
2045
|
-
{
|
|
2046
|
-
"moduleId": 87,
|
|
2047
|
-
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
2048
|
-
"module": "./components/index.js + 88 modules",
|
|
2049
|
-
"moduleName": "./components/index.js + 88 modules",
|
|
2050
|
-
"type": "harmony import specifier",
|
|
2051
|
-
"userRequest": "react",
|
|
2052
|
-
"loc": "127:13-18"
|
|
2053
|
-
},
|
|
2054
2045
|
{
|
|
2055
2046
|
"moduleId": 87,
|
|
2056
2047
|
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
@@ -2141,6 +2132,15 @@
|
|
|
2141
2132
|
"userRequest": "react",
|
|
2142
2133
|
"loc": "139:19-27"
|
|
2143
2134
|
},
|
|
2135
|
+
{
|
|
2136
|
+
"moduleId": 87,
|
|
2137
|
+
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
2138
|
+
"module": "./components/index.js + 88 modules",
|
|
2139
|
+
"moduleName": "./components/index.js + 88 modules",
|
|
2140
|
+
"type": "harmony import specifier",
|
|
2141
|
+
"userRequest": "react",
|
|
2142
|
+
"loc": "140:13-18"
|
|
2143
|
+
},
|
|
2144
2144
|
{
|
|
2145
2145
|
"moduleId": 87,
|
|
2146
2146
|
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
@@ -2301,7 +2301,7 @@
|
|
|
2301
2301
|
"moduleName": "./components/index.js + 88 modules",
|
|
2302
2302
|
"type": "harmony import specifier",
|
|
2303
2303
|
"userRequest": "react",
|
|
2304
|
-
"loc": "
|
|
2304
|
+
"loc": "163:19-27"
|
|
2305
2305
|
},
|
|
2306
2306
|
{
|
|
2307
2307
|
"moduleId": 87,
|
|
@@ -2310,7 +2310,7 @@
|
|
|
2310
2310
|
"moduleName": "./components/index.js + 88 modules",
|
|
2311
2311
|
"type": "harmony import specifier",
|
|
2312
2312
|
"userRequest": "react",
|
|
2313
|
-
"loc": "
|
|
2313
|
+
"loc": "164:32-37"
|
|
2314
2314
|
},
|
|
2315
2315
|
{
|
|
2316
2316
|
"moduleId": 87,
|
|
@@ -2319,7 +2319,7 @@
|
|
|
2319
2319
|
"moduleName": "./components/index.js + 88 modules",
|
|
2320
2320
|
"type": "harmony import specifier",
|
|
2321
2321
|
"userRequest": "react",
|
|
2322
|
-
"loc": "
|
|
2322
|
+
"loc": "166:2-11"
|
|
2323
2323
|
},
|
|
2324
2324
|
{
|
|
2325
2325
|
"moduleId": 87,
|
|
@@ -2328,7 +2328,7 @@
|
|
|
2328
2328
|
"moduleName": "./components/index.js + 88 modules",
|
|
2329
2329
|
"type": "harmony import specifier",
|
|
2330
2330
|
"userRequest": "react",
|
|
2331
|
-
"loc": "
|
|
2331
|
+
"loc": "167:9-14"
|
|
2332
2332
|
},
|
|
2333
2333
|
{
|
|
2334
2334
|
"moduleId": 87,
|
|
@@ -2337,7 +2337,7 @@
|
|
|
2337
2337
|
"moduleName": "./components/index.js + 88 modules",
|
|
2338
2338
|
"type": "harmony import specifier",
|
|
2339
2339
|
"userRequest": "react",
|
|
2340
|
-
"loc": "
|
|
2340
|
+
"loc": "169:2-11"
|
|
2341
2341
|
},
|
|
2342
2342
|
{
|
|
2343
2343
|
"moduleId": 87,
|
|
@@ -2346,7 +2346,7 @@
|
|
|
2346
2346
|
"moduleName": "./components/index.js + 88 modules",
|
|
2347
2347
|
"type": "harmony import specifier",
|
|
2348
2348
|
"userRequest": "react",
|
|
2349
|
-
"loc": "
|
|
2349
|
+
"loc": "171:24-29"
|
|
2350
2350
|
},
|
|
2351
2351
|
{
|
|
2352
2352
|
"moduleId": 87,
|
|
@@ -2355,7 +2355,7 @@
|
|
|
2355
2355
|
"moduleName": "./components/index.js + 88 modules",
|
|
2356
2356
|
"type": "harmony import specifier",
|
|
2357
2357
|
"userRequest": "react",
|
|
2358
|
-
"loc": "
|
|
2358
|
+
"loc": "175:2-7"
|
|
2359
2359
|
},
|
|
2360
2360
|
{
|
|
2361
2361
|
"moduleId": 87,
|
|
@@ -6300,7 +6300,7 @@
|
|
|
6300
6300
|
"moduleName": "./components/index.js + 88 modules",
|
|
6301
6301
|
"type": "harmony import specifier",
|
|
6302
6302
|
"userRequest": "classnames",
|
|
6303
|
-
"loc": "
|
|
6303
|
+
"loc": "142:19-29"
|
|
6304
6304
|
},
|
|
6305
6305
|
{
|
|
6306
6306
|
"moduleId": 87,
|
|
@@ -7780,9 +7780,9 @@
|
|
|
7780
7780
|
"chunks": [
|
|
7781
7781
|
0
|
|
7782
7782
|
],
|
|
7783
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
7784
|
-
"issuerId":
|
|
7785
|
-
"issuerName": "./node_modules/react-resizable/build/
|
|
7783
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
|
|
7784
|
+
"issuerId": 15,
|
|
7785
|
+
"issuerName": "./node_modules/react-resizable/build/Resizable.js",
|
|
7786
7786
|
"issuerPath": [
|
|
7787
7787
|
{
|
|
7788
7788
|
"id": null,
|
|
@@ -7800,9 +7800,9 @@
|
|
|
7800
7800
|
"name": "./node_modules/react-resizable/index.js"
|
|
7801
7801
|
},
|
|
7802
7802
|
{
|
|
7803
|
-
"id":
|
|
7804
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
7805
|
-
"name": "./node_modules/react-resizable/build/
|
|
7803
|
+
"id": 15,
|
|
7804
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
|
|
7805
|
+
"name": "./node_modules/react-resizable/build/Resizable.js"
|
|
7806
7806
|
}
|
|
7807
7807
|
],
|
|
7808
7808
|
"failed": false,
|
|
@@ -12767,7 +12767,7 @@
|
|
|
12767
12767
|
"name": "./components/index.js + 88 modules",
|
|
12768
12768
|
"index": 0,
|
|
12769
12769
|
"index2": 187,
|
|
12770
|
-
"size":
|
|
12770
|
+
"size": 398015,
|
|
12771
12771
|
"cacheable": true,
|
|
12772
12772
|
"built": true,
|
|
12773
12773
|
"optional": false,
|
|
@@ -13447,7 +13447,7 @@
|
|
|
13447
13447
|
"moduleName": "./components/QueryListScene/QueryForm.js",
|
|
13448
13448
|
"type": "harmony import specifier",
|
|
13449
13449
|
"userRequest": "../QueryForm",
|
|
13450
|
-
"loc": "
|
|
13450
|
+
"loc": "120:25-29"
|
|
13451
13451
|
},
|
|
13452
13452
|
{
|
|
13453
13453
|
"moduleId": null,
|
|
@@ -13456,7 +13456,7 @@
|
|
|
13456
13456
|
"moduleName": "./components/QueryListScene/QueryForm.js",
|
|
13457
13457
|
"type": "harmony import specifier",
|
|
13458
13458
|
"userRequest": "../QueryForm",
|
|
13459
|
-
"loc": "
|
|
13459
|
+
"loc": "140:33-37"
|
|
13460
13460
|
},
|
|
13461
13461
|
{
|
|
13462
13462
|
"moduleId": null,
|
|
@@ -13465,7 +13465,7 @@
|
|
|
13465
13465
|
"moduleName": "./components/QueryListScene/QueryForm.js",
|
|
13466
13466
|
"type": "harmony import specifier",
|
|
13467
13467
|
"userRequest": "../QueryForm",
|
|
13468
|
-
"loc": "
|
|
13468
|
+
"loc": "179:18-22"
|
|
13469
13469
|
}
|
|
13470
13470
|
],
|
|
13471
13471
|
"usedExports": [
|
|
@@ -16637,7 +16637,7 @@
|
|
|
16637
16637
|
"name": "./components/QueryListScene/QueryForm.js",
|
|
16638
16638
|
"index": 148,
|
|
16639
16639
|
"index2": 146,
|
|
16640
|
-
"size":
|
|
16640
|
+
"size": 9103,
|
|
16641
16641
|
"cacheable": true,
|
|
16642
16642
|
"built": true,
|
|
16643
16643
|
"optional": false,
|
|
@@ -16708,7 +16708,7 @@
|
|
|
16708
16708
|
],
|
|
16709
16709
|
"optimizationBailout": [],
|
|
16710
16710
|
"depth": 2,
|
|
16711
|
-
"source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function () {\n var _this$props = _this.props
|
|
16711
|
+
"source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function _callee() {\n var _this$props, onSearch, actions, values, params;\n\n return regeneratorRuntime.async(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$props = _this.props, onSearch = _this$props.onSearch, actions = _this$props.actions;\n values = actions.getFormData();\n params = _objectSpread({}, values, {\n current: 1\n });\n _context.next = 5;\n return regeneratorRuntime.awrap(actions.setData('formData', values));\n\n case 5:\n // memory 与 url解析setForm时 监听事件异步\n onSearch && onSearch(params);\n actions.emit('search', params);\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n });\n };\n\n _this.onReset = function () {\n var _this$props2 = _this.props,\n initialValues = _this$props2.initialValues,\n onReset = _this$props2.onReset,\n actions = _this$props2.actions;\n actions.setFormData(initialValues, false);\n onReset && onReset(initialValues);\n\n _this.onSearch();\n };\n\n _this.onChange = function (newValues, changedInfo) {\n var _this$props3 = _this.props,\n onChange = _this$props3.onChange,\n actions = _this$props3.actions;\n\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n\n onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));\n actions.setFormData(newValues, false);\n };\n\n _this.setFormData = function (data, needSearch) {\n var actions = _this.props.actions;\n actions.setData('formData', data);\n\n _this.form.setValues(data);\n\n needSearch && _this.onSearch();\n };\n\n _this.resetFormData = function (needSearch) {\n var _this$props4 = _this.props,\n initialValues = _this$props4.initialValues,\n actions = _this$props4.actions;\n actions.setFormData(initialValues, needSearch);\n\n _this.form.resetValues();\n };\n\n var _actions = props.actions,\n form = props.form;\n _this.form = form || Form.createForm();\n\n _actions.on('setFormData', _this.setFormData);\n\n _actions.on('resetFormData', _this.resetFormData);\n\n return _this;\n }\n\n _createClass(QueryForm, [{\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n actions = _this$props5.actions,\n extraActions = _this$props5.extraActions,\n extralActions = _this$props5.extralActions,\n qlsProps = _this$props5.qlsProps,\n props = _objectWithoutProperties(_this$props5, [\"className\", \"actions\", \"extraActions\", \"extralActions\", \"qlsProps\"]);\n\n return React.createElement(Form, _extends({}, props, {\n form: this.form,\n className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api\n ,\n extraActions: extraActions || extralActions,\n onChange: this.onChange,\n onSearch: this.onSearch,\n onReset: this.onReset\n }));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props6 = this.props,\n _this$props6$initialV = _this$props6.initialValues,\n initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,\n actions = _this$props6.actions,\n qlsProps = _this$props6.qlsProps;\n\n if (qlsProps.memory) {\n actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);\n } else {\n actions.setData('formData', initialValues);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var actions = this.props.actions;\n actions.removeListener('setFormData', this.setFormData);\n actions.removeListener('resetFormData', this.resetFormData);\n }\n }]);\n\n return QueryForm;\n}(React.PureComponent);\n\nexport { QueryForm as default };\n;\nQueryForm.Field = Form.Field;"
|
|
16712
16712
|
},
|
|
16713
16713
|
{
|
|
16714
16714
|
"id": null,
|
|
@@ -23489,15 +23489,6 @@
|
|
|
23489
23489
|
"userRequest": "react",
|
|
23490
23490
|
"loc": "125:7-12"
|
|
23491
23491
|
},
|
|
23492
|
-
{
|
|
23493
|
-
"moduleId": 87,
|
|
23494
|
-
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
23495
|
-
"module": "./components/index.js + 88 modules",
|
|
23496
|
-
"moduleName": "./components/index.js + 88 modules",
|
|
23497
|
-
"type": "harmony import specifier",
|
|
23498
|
-
"userRequest": "react",
|
|
23499
|
-
"loc": "127:13-18"
|
|
23500
|
-
},
|
|
23501
23492
|
{
|
|
23502
23493
|
"moduleId": 87,
|
|
23503
23494
|
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
@@ -23588,6 +23579,15 @@
|
|
|
23588
23579
|
"userRequest": "react",
|
|
23589
23580
|
"loc": "139:19-27"
|
|
23590
23581
|
},
|
|
23582
|
+
{
|
|
23583
|
+
"moduleId": 87,
|
|
23584
|
+
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
23585
|
+
"module": "./components/index.js + 88 modules",
|
|
23586
|
+
"moduleName": "./components/index.js + 88 modules",
|
|
23587
|
+
"type": "harmony import specifier",
|
|
23588
|
+
"userRequest": "react",
|
|
23589
|
+
"loc": "140:13-18"
|
|
23590
|
+
},
|
|
23591
23591
|
{
|
|
23592
23592
|
"moduleId": 87,
|
|
23593
23593
|
"moduleIdentifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/index.js 0de00df39b570001579eec32a923d15e",
|
|
@@ -23748,7 +23748,7 @@
|
|
|
23748
23748
|
"moduleName": "./components/index.js + 88 modules",
|
|
23749
23749
|
"type": "harmony import specifier",
|
|
23750
23750
|
"userRequest": "react",
|
|
23751
|
-
"loc": "
|
|
23751
|
+
"loc": "163:19-27"
|
|
23752
23752
|
},
|
|
23753
23753
|
{
|
|
23754
23754
|
"moduleId": 87,
|
|
@@ -23757,7 +23757,7 @@
|
|
|
23757
23757
|
"moduleName": "./components/index.js + 88 modules",
|
|
23758
23758
|
"type": "harmony import specifier",
|
|
23759
23759
|
"userRequest": "react",
|
|
23760
|
-
"loc": "
|
|
23760
|
+
"loc": "164:32-37"
|
|
23761
23761
|
},
|
|
23762
23762
|
{
|
|
23763
23763
|
"moduleId": 87,
|
|
@@ -23766,7 +23766,7 @@
|
|
|
23766
23766
|
"moduleName": "./components/index.js + 88 modules",
|
|
23767
23767
|
"type": "harmony import specifier",
|
|
23768
23768
|
"userRequest": "react",
|
|
23769
|
-
"loc": "
|
|
23769
|
+
"loc": "166:2-11"
|
|
23770
23770
|
},
|
|
23771
23771
|
{
|
|
23772
23772
|
"moduleId": 87,
|
|
@@ -23775,7 +23775,7 @@
|
|
|
23775
23775
|
"moduleName": "./components/index.js + 88 modules",
|
|
23776
23776
|
"type": "harmony import specifier",
|
|
23777
23777
|
"userRequest": "react",
|
|
23778
|
-
"loc": "
|
|
23778
|
+
"loc": "167:9-14"
|
|
23779
23779
|
},
|
|
23780
23780
|
{
|
|
23781
23781
|
"moduleId": 87,
|
|
@@ -23784,7 +23784,7 @@
|
|
|
23784
23784
|
"moduleName": "./components/index.js + 88 modules",
|
|
23785
23785
|
"type": "harmony import specifier",
|
|
23786
23786
|
"userRequest": "react",
|
|
23787
|
-
"loc": "
|
|
23787
|
+
"loc": "169:2-11"
|
|
23788
23788
|
},
|
|
23789
23789
|
{
|
|
23790
23790
|
"moduleId": 87,
|
|
@@ -23793,7 +23793,7 @@
|
|
|
23793
23793
|
"moduleName": "./components/index.js + 88 modules",
|
|
23794
23794
|
"type": "harmony import specifier",
|
|
23795
23795
|
"userRequest": "react",
|
|
23796
|
-
"loc": "
|
|
23796
|
+
"loc": "171:24-29"
|
|
23797
23797
|
},
|
|
23798
23798
|
{
|
|
23799
23799
|
"moduleId": 87,
|
|
@@ -23802,7 +23802,7 @@
|
|
|
23802
23802
|
"moduleName": "./components/index.js + 88 modules",
|
|
23803
23803
|
"type": "harmony import specifier",
|
|
23804
23804
|
"userRequest": "react",
|
|
23805
|
-
"loc": "
|
|
23805
|
+
"loc": "175:2-7"
|
|
23806
23806
|
},
|
|
23807
23807
|
{
|
|
23808
23808
|
"moduleId": 87,
|
|
@@ -27747,7 +27747,7 @@
|
|
|
27747
27747
|
"moduleName": "./components/index.js + 88 modules",
|
|
27748
27748
|
"type": "harmony import specifier",
|
|
27749
27749
|
"userRequest": "classnames",
|
|
27750
|
-
"loc": "
|
|
27750
|
+
"loc": "142:19-29"
|
|
27751
27751
|
},
|
|
27752
27752
|
{
|
|
27753
27753
|
"moduleId": 87,
|
|
@@ -29227,9 +29227,9 @@
|
|
|
29227
29227
|
"chunks": [
|
|
29228
29228
|
0
|
|
29229
29229
|
],
|
|
29230
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
29231
|
-
"issuerId":
|
|
29232
|
-
"issuerName": "./node_modules/react-resizable/build/
|
|
29230
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
|
|
29231
|
+
"issuerId": 15,
|
|
29232
|
+
"issuerName": "./node_modules/react-resizable/build/Resizable.js",
|
|
29233
29233
|
"issuerPath": [
|
|
29234
29234
|
{
|
|
29235
29235
|
"id": null,
|
|
@@ -29247,9 +29247,9 @@
|
|
|
29247
29247
|
"name": "./node_modules/react-resizable/index.js"
|
|
29248
29248
|
},
|
|
29249
29249
|
{
|
|
29250
|
-
"id":
|
|
29251
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
29252
|
-
"name": "./node_modules/react-resizable/build/
|
|
29250
|
+
"id": 15,
|
|
29251
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
|
|
29252
|
+
"name": "./node_modules/react-resizable/build/Resizable.js"
|
|
29253
29253
|
}
|
|
29254
29254
|
],
|
|
29255
29255
|
"failed": false,
|
|
@@ -34214,7 +34214,7 @@
|
|
|
34214
34214
|
"name": "./components/index.js + 88 modules",
|
|
34215
34215
|
"index": 0,
|
|
34216
34216
|
"index2": 187,
|
|
34217
|
-
"size":
|
|
34217
|
+
"size": 398015,
|
|
34218
34218
|
"cacheable": true,
|
|
34219
34219
|
"built": true,
|
|
34220
34220
|
"optional": false,
|
|
@@ -34894,7 +34894,7 @@
|
|
|
34894
34894
|
"moduleName": "./components/QueryListScene/QueryForm.js",
|
|
34895
34895
|
"type": "harmony import specifier",
|
|
34896
34896
|
"userRequest": "../QueryForm",
|
|
34897
|
-
"loc": "
|
|
34897
|
+
"loc": "120:25-29"
|
|
34898
34898
|
},
|
|
34899
34899
|
{
|
|
34900
34900
|
"moduleId": null,
|
|
@@ -34903,7 +34903,7 @@
|
|
|
34903
34903
|
"moduleName": "./components/QueryListScene/QueryForm.js",
|
|
34904
34904
|
"type": "harmony import specifier",
|
|
34905
34905
|
"userRequest": "../QueryForm",
|
|
34906
|
-
"loc": "
|
|
34906
|
+
"loc": "140:33-37"
|
|
34907
34907
|
},
|
|
34908
34908
|
{
|
|
34909
34909
|
"moduleId": null,
|
|
@@ -34912,7 +34912,7 @@
|
|
|
34912
34912
|
"moduleName": "./components/QueryListScene/QueryForm.js",
|
|
34913
34913
|
"type": "harmony import specifier",
|
|
34914
34914
|
"userRequest": "../QueryForm",
|
|
34915
|
-
"loc": "
|
|
34915
|
+
"loc": "179:18-22"
|
|
34916
34916
|
}
|
|
34917
34917
|
],
|
|
34918
34918
|
"usedExports": [
|
|
@@ -38084,7 +38084,7 @@
|
|
|
38084
38084
|
"name": "./components/QueryListScene/QueryForm.js",
|
|
38085
38085
|
"index": 148,
|
|
38086
38086
|
"index2": 146,
|
|
38087
|
-
"size":
|
|
38087
|
+
"size": 9103,
|
|
38088
38088
|
"cacheable": true,
|
|
38089
38089
|
"built": true,
|
|
38090
38090
|
"optional": false,
|
|
@@ -38155,7 +38155,7 @@
|
|
|
38155
38155
|
],
|
|
38156
38156
|
"optimizationBailout": [],
|
|
38157
38157
|
"depth": 2,
|
|
38158
|
-
"source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function () {\n var _this$props = _this.props
|
|
38158
|
+
"source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function _callee() {\n var _this$props, onSearch, actions, values, params;\n\n return regeneratorRuntime.async(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$props = _this.props, onSearch = _this$props.onSearch, actions = _this$props.actions;\n values = actions.getFormData();\n params = _objectSpread({}, values, {\n current: 1\n });\n _context.next = 5;\n return regeneratorRuntime.awrap(actions.setData('formData', values));\n\n case 5:\n // memory 与 url解析setForm时 监听事件异步\n onSearch && onSearch(params);\n actions.emit('search', params);\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n });\n };\n\n _this.onReset = function () {\n var _this$props2 = _this.props,\n initialValues = _this$props2.initialValues,\n onReset = _this$props2.onReset,\n actions = _this$props2.actions;\n actions.setFormData(initialValues, false);\n onReset && onReset(initialValues);\n\n _this.onSearch();\n };\n\n _this.onChange = function (newValues, changedInfo) {\n var _this$props3 = _this.props,\n onChange = _this$props3.onChange,\n actions = _this$props3.actions;\n\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n\n onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));\n actions.setFormData(newValues, false);\n };\n\n _this.setFormData = function (data, needSearch) {\n var actions = _this.props.actions;\n actions.setData('formData', data);\n\n _this.form.setValues(data);\n\n needSearch && _this.onSearch();\n };\n\n _this.resetFormData = function (needSearch) {\n var _this$props4 = _this.props,\n initialValues = _this$props4.initialValues,\n actions = _this$props4.actions;\n actions.setFormData(initialValues, needSearch);\n\n _this.form.resetValues();\n };\n\n var _actions = props.actions,\n form = props.form;\n _this.form = form || Form.createForm();\n\n _actions.on('setFormData', _this.setFormData);\n\n _actions.on('resetFormData', _this.resetFormData);\n\n return _this;\n }\n\n _createClass(QueryForm, [{\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n actions = _this$props5.actions,\n extraActions = _this$props5.extraActions,\n extralActions = _this$props5.extralActions,\n qlsProps = _this$props5.qlsProps,\n props = _objectWithoutProperties(_this$props5, [\"className\", \"actions\", \"extraActions\", \"extralActions\", \"qlsProps\"]);\n\n return React.createElement(Form, _extends({}, props, {\n form: this.form,\n className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api\n ,\n extraActions: extraActions || extralActions,\n onChange: this.onChange,\n onSearch: this.onSearch,\n onReset: this.onReset\n }));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props6 = this.props,\n _this$props6$initialV = _this$props6.initialValues,\n initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,\n actions = _this$props6.actions,\n qlsProps = _this$props6.qlsProps;\n\n if (qlsProps.memory) {\n actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);\n } else {\n actions.setData('formData', initialValues);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var actions = this.props.actions;\n actions.removeListener('setFormData', this.setFormData);\n actions.removeListener('resetFormData', this.resetFormData);\n }\n }]);\n\n return QueryForm;\n}(React.PureComponent);\n\nexport { QueryForm as default };\n;\nQueryForm.Field = Form.Field;"
|
|
38159
38159
|
},
|
|
38160
38160
|
{
|
|
38161
38161
|
"id": null,
|