tntd 1.4.18 → 1.4.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.
Files changed (171) hide show
  1. package/components/Ellipsis/index.js +1 -1
  2. package/components/Layout/Avatar.js +4 -4
  3. package/components/Layout/EnterpriseLayout/Avatar.js +10 -7
  4. package/components/Layout/EnterpriseLayout/Language.js +5 -3
  5. package/components/Layout/EnterpriseLayout/Theme.js +6 -7
  6. package/components/Layout/EnterpriseLayout/index.js +1 -1
  7. package/components/Layout/HeaderActions.js +13 -10
  8. package/components/Layout/HeaderTabs.js +13 -14
  9. package/components/Layout/Layout.js +2 -0
  10. package/components/Layout/index.js +2 -1
  11. package/components/Layout/storage.js +12 -2
  12. package/components/Page/index.js +2 -2
  13. package/components/locale.js +7 -2
  14. package/dist/1.tntd.js +1 -12
  15. package/dist/stats.json +28426 -28000
  16. package/dist/tntd.css +1 -1
  17. package/dist/tntd.js +13 -7
  18. package/es/ArrayInput/icon.js +5 -5
  19. package/es/ArrayInput/index.js +76 -108
  20. package/es/AuthContext.js +1 -1
  21. package/es/Columns/index.js +31 -38
  22. package/es/DevelopmentLogin/LoginModal.js +32 -45
  23. package/es/DevelopmentLogin/index.js +13 -17
  24. package/es/Ellipsis/Svg/CopySVG.js +13 -13
  25. package/es/Ellipsis/Svg/TickSVG.js +8 -8
  26. package/es/Ellipsis/index.js +59 -70
  27. package/es/Handle/index.js +25 -35
  28. package/es/Icon/fonts/iconfont.js +7 -12
  29. package/es/Icon/index.js +10 -13
  30. package/es/Img/Contain.js +24 -29
  31. package/es/Img/Cover.js +40 -54
  32. package/es/Img/index.js +36 -45
  33. package/es/Layout/ActionsContext.js +3 -2
  34. package/es/Layout/AppList.js +37 -92
  35. package/es/Layout/Application.js +26 -72
  36. package/es/Layout/Avatar.js +32 -69
  37. package/es/Layout/CompatibleLanguage.js +39 -94
  38. package/es/Layout/EnterpriseLayout/Avatar.js +49 -79
  39. package/es/Layout/EnterpriseLayout/Language.js +19 -34
  40. package/es/Layout/EnterpriseLayout/Theme.js +23 -37
  41. package/es/Layout/EnterpriseLayout/index.js +14 -16
  42. package/es/Layout/GlobalNavigation/NavigationPopup.js +59 -170
  43. package/es/Layout/GlobalNavigation/index.js +20 -54
  44. package/es/Layout/Header.js +25 -46
  45. package/es/Layout/HeaderActions.js +52 -63
  46. package/es/Layout/HeaderNavs.js +20 -47
  47. package/es/Layout/HeaderTabs.js +61 -115
  48. package/es/Layout/Iconfont.js +1 -1
  49. package/es/Layout/Language.js +14 -32
  50. package/es/Layout/Layout.js +88 -108
  51. package/es/Layout/Logo.js +16 -32
  52. package/es/Layout/OrgAppList.js +62 -107
  53. package/es/Layout/SideMenu.js +63 -124
  54. package/es/Layout/Theme.js +23 -61
  55. package/es/Layout/index.js +29 -36
  56. package/es/Layout/paaslayout/CompactSideMenu.js +35 -74
  57. package/es/Layout/paaslayout/Header.js +22 -45
  58. package/es/Layout/paaslayout/Logo.js +3 -13
  59. package/es/Layout/paaslayout/SideMenu.js +39 -78
  60. package/es/Layout/paaslayout/index.js +75 -102
  61. package/es/Layout/storage.js +26 -9
  62. package/es/LoadingButton/index.js +15 -24
  63. package/es/Modal/index.js +38 -46
  64. package/es/Page/Box.js +34 -41
  65. package/es/Page/index.js +54 -68
  66. package/es/Page/utils.js +0 -5
  67. package/es/QueryForm/Field/Checkbox.js +5 -9
  68. package/es/QueryForm/Field/Select.js +31 -41
  69. package/es/QueryForm/Field/SelectInput.js +26 -41
  70. package/es/QueryForm/Field/fieldsMap.js +0 -1
  71. package/es/QueryForm/Field/index.js +41 -71
  72. package/es/QueryForm/createActions.js +6 -7
  73. package/es/QueryForm/index.js +76 -135
  74. package/es/QueryListScene/List.js +74 -128
  75. package/es/QueryListScene/QueryForm.js +46 -81
  76. package/es/QueryListScene/QueryListScene.js +25 -40
  77. package/es/QueryListScene/Title.js +3 -3
  78. package/es/QueryListScene/Toolbar.js +11 -12
  79. package/es/Select/DropDownWrap.js +29 -50
  80. package/es/Select/index.js +135 -231
  81. package/es/Table/ResizableTable/index.js +26 -40
  82. package/es/Table/index.js +18 -16
  83. package/es/Title/index.js +21 -23
  84. package/es/locale.js +9 -7
  85. package/es/utils/checkAuth.js +3 -5
  86. package/es/utils/findMenuInfoByPath.js +0 -4
  87. package/es/utils/index.js +12 -23
  88. package/lib/ArrayInput/icon.js +6 -6
  89. package/lib/ArrayInput/index.js +78 -127
  90. package/lib/AuthContext.js +1 -4
  91. package/lib/Columns/index.js +31 -47
  92. package/lib/DevelopmentLogin/LoginModal.js +32 -58
  93. package/lib/DevelopmentLogin/index.js +16 -27
  94. package/lib/Ellipsis/Svg/CopySVG.js +13 -15
  95. package/lib/Ellipsis/Svg/TickSVG.js +8 -10
  96. package/lib/Ellipsis/index.js +58 -81
  97. package/lib/Handle/index.js +25 -47
  98. package/lib/Icon/fonts/iconfont.js +7 -12
  99. package/lib/Icon/index.js +11 -20
  100. package/lib/Img/Contain.js +24 -34
  101. package/lib/Img/Cover.js +42 -65
  102. package/lib/Img/index.js +36 -51
  103. package/lib/Layout/ActionsContext.js +1 -4
  104. package/lib/Layout/AppList.js +40 -118
  105. package/lib/Layout/Application.js +26 -86
  106. package/lib/Layout/Avatar.js +35 -89
  107. package/lib/Layout/CompatibleLanguage.js +39 -110
  108. package/lib/Layout/EnterpriseLayout/Avatar.js +52 -101
  109. package/lib/Layout/EnterpriseLayout/Language.js +21 -49
  110. package/lib/Layout/EnterpriseLayout/Theme.js +22 -46
  111. package/lib/Layout/EnterpriseLayout/index.js +14 -23
  112. package/lib/Layout/GlobalNavigation/NavigationPopup.js +59 -186
  113. package/lib/Layout/GlobalNavigation/index.js +23 -74
  114. package/lib/Layout/Header.js +28 -63
  115. package/lib/Layout/HeaderActions.js +48 -74
  116. package/lib/Layout/HeaderNavs.js +23 -61
  117. package/lib/Layout/HeaderTabs.js +58 -126
  118. package/lib/Layout/Iconfont.js +1 -5
  119. package/lib/Layout/Language.js +17 -48
  120. package/lib/Layout/Layout.js +90 -128
  121. package/lib/Layout/Logo.js +19 -43
  122. package/lib/Layout/OrgAppList.js +64 -127
  123. package/lib/Layout/SideMenu.js +65 -143
  124. package/lib/Layout/Theme.js +23 -73
  125. package/lib/Layout/createActions.js +0 -5
  126. package/lib/Layout/images/index.js +0 -28
  127. package/lib/Layout/index.js +33 -57
  128. package/lib/Layout/paaslayout/CompactSideMenu.js +35 -84
  129. package/lib/Layout/paaslayout/Header.js +22 -55
  130. package/lib/Layout/paaslayout/Logo.js +3 -19
  131. package/lib/Layout/paaslayout/SideMenu.js +39 -87
  132. package/lib/Layout/paaslayout/index.js +77 -122
  133. package/lib/Layout/storage.js +29 -35
  134. package/lib/LoadingButton/index.js +15 -29
  135. package/lib/Modal/index.js +38 -53
  136. package/lib/Page/Box.js +34 -45
  137. package/lib/Page/index.js +54 -78
  138. package/lib/Page/utils.js +1 -9
  139. package/lib/QueryForm/Field/Checkbox.js +5 -13
  140. package/lib/QueryForm/Field/Select.js +33 -53
  141. package/lib/QueryForm/Field/SelectInput.js +28 -56
  142. package/lib/QueryForm/Field/fieldsMap.js +1 -15
  143. package/lib/QueryForm/Field/index.js +43 -81
  144. package/lib/QueryForm/createActions.js +6 -12
  145. package/lib/QueryForm/index.js +78 -157
  146. package/lib/QueryForm/useForm.js +0 -5
  147. package/lib/QueryListScene/List.js +76 -140
  148. package/lib/QueryListScene/QueryForm.js +46 -86
  149. package/lib/QueryListScene/QueryListScene.js +25 -46
  150. package/lib/QueryListScene/Title.js +3 -7
  151. package/lib/QueryListScene/Toolbar.js +11 -16
  152. package/lib/QueryListScene/createActions.js +0 -5
  153. package/lib/QueryListScene/index.js +0 -10
  154. package/lib/QueryListScene/useActions.js +0 -5
  155. package/lib/Select/DropDownWrap.js +31 -56
  156. package/lib/Select/index.js +135 -241
  157. package/lib/Table/ResizableTable/index.js +26 -48
  158. package/lib/Table/index.js +17 -28
  159. package/lib/Title/index.js +21 -28
  160. package/lib/index.js +35 -56
  161. package/lib/locale.js +11 -12
  162. package/lib/utils/checkAuth.js +4 -9
  163. package/lib/utils/findMenuInfoByPath.js +1 -8
  164. package/lib/utils/index.js +15 -42
  165. package/package.json +2 -2
  166. package/es/Layout/checkAuth.js +0 -29
  167. package/es/Layout/utils.js +0 -136
  168. package/lib/Layout/EnterpriseLayout/Header.js +0 -113
  169. package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
  170. package/lib/Layout/checkAuth.js +0 -39
  171. package/lib/Layout/utils.js +0 -166
@@ -1,36 +1,25 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  import "antd/lib/spin/style";
2
3
  import _Spin from "antd/lib/spin";
3
-
4
- 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); }
5
-
6
- function _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); }
7
-
4
+ var _excluded = ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"];
5
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
8
6
  function _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; }
9
-
10
7
  function _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; }
11
-
12
- function 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; }
13
-
14
- function _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; }
15
-
16
- function _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; }
17
-
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
11
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- function _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); } }
21
-
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
-
24
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
25
-
12
+ function _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, _toPropertyKey(descriptor.key), descriptor); } }
13
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
+ function _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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
17
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
19
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
20
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
-
28
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
-
30
- function _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); }
31
-
32
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
-
21
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
22
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
34
23
  /**
35
24
  * @file QueryList
36
25
  * @author you.zhang
@@ -41,68 +30,55 @@ import cn from 'classnames';
41
30
  import { get, pickBy, isEmpty, debounce, throttle } from 'lodash';
42
31
  import Table from '../Table';
43
32
  import { getText, getLanguage } from '../locale';
44
-
45
- var QueryList =
46
- /*#__PURE__*/
47
- function (_React$PureComponent) {
33
+ var QueryList = /*#__PURE__*/function (_React$PureComponent) {
48
34
  _inherits(QueryList, _React$PureComponent);
49
-
35
+ var _super = _createSuper(QueryList);
50
36
  function QueryList(props) {
51
37
  var _props$scroll;
52
-
53
38
  var _this;
54
-
55
39
  _classCallCheck(this, QueryList);
56
-
57
- _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryList).call(this, props));
40
+ _this = _super.call(this, props);
58
41
  _this.onWindowResize = debounce(function () {
59
42
  var scroll = _this.state.scroll;
60
-
61
43
  _this.setState({
62
- scroll: _objectSpread({}, scroll, {
44
+ scroll: _objectSpread(_objectSpread({}, scroll), {}, {
63
45
  y: window.innerHeight - (_this.initialTop || _this.props.top || 200)
64
46
  })
65
47
  });
66
48
  }, 50);
67
-
68
49
  _this.fetchData = function () {
69
50
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
70
-
71
51
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
72
- callback = _ref.callback,
73
- _ref$showLoading = _ref.showLoading,
74
- showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
75
- isInterval = _ref.isInterval;
76
-
52
+ callback = _ref.callback,
53
+ _ref$showLoading = _ref.showLoading,
54
+ showLoading = _ref$showLoading === void 0 ? true : _ref$showLoading,
55
+ isInterval = _ref.isInterval;
77
56
  var _this$props = _this.props,
78
- query = _this$props.qlsProps.query,
79
- defaultExpandAllRows = _this$props.defaultExpandAllRows,
80
- rowKey = _this$props.rowKey,
81
- actions = _this$props.actions;
57
+ query = _this$props.qlsProps.query,
58
+ defaultExpandAllRows = _this$props.defaultExpandAllRows,
59
+ rowKey = _this$props.rowKey,
60
+ actions = _this$props.actions;
82
61
  var pagination = _this.state.pagination;
83
62
  var hasPagination = _this.props.pagination !== false;
84
-
85
63
  if (hasPagination) {
86
64
  params = _objectSpread({
87
65
  pageSize: pagination.pageSize,
88
66
  current: pagination.current
89
67
  }, params);
90
68
  }
91
-
92
69
  showLoading && _this.setState({
93
70
  loading: true
94
- }); // 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
71
+ });
95
72
 
73
+ // 当用户操作查询还未得到服务端响应前,不要执行轮询请求时序问题导致覆盖
96
74
  if (!isInterval) {
97
75
  _this.isFetching = true;
98
76
  }
99
-
100
77
  actions.setData('submittedFormData', params);
101
78
  return query(pickBy(params, function (val) {
102
79
  return val !== '' && val !== null && val !== undefined;
103
80
  })).then(function (result) {
104
81
  var dataSource = hasPagination ? result.data || [] : result;
105
-
106
82
  _this.setState(_objectSpread({
107
83
  loading: false,
108
84
  dataSource: dataSource,
@@ -127,50 +103,42 @@ function (_React$PureComponent) {
127
103
  callback && callback();
128
104
  });
129
105
  };
130
-
131
106
  _this.updateDataSource = function (dataSource) {
132
107
  _this.setState({
133
108
  dataSource: dataSource
134
109
  });
135
-
136
110
  _this.props.actions.setData('dataSource', dataSource);
137
111
  };
138
-
139
112
  _this.updatePagination = function (pagination) {
140
113
  _this.setState({
141
114
  pagination: pagination
142
115
  });
143
-
144
116
  _this.props.actions.setData('pagination', pagination);
145
117
  };
146
-
147
118
  _this.onFormChange = function (values) {
148
- _this.formData = pickBy(_objectSpread({}, values, {
119
+ _this.formData = pickBy(_objectSpread(_objectSpread({}, values), {}, {
149
120
  sorter: get(_this.formData, 'sorter'),
150
121
  filters: get(_this.formData, 'filters')
151
122
  }), function (val) {
152
123
  return val !== undefined;
153
124
  });
154
125
  };
155
-
156
126
  _this.onSearch = function (values) {
157
127
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
158
- callback = _ref2.callback,
159
- _ref2$showLoading = _ref2.showLoading,
160
- showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
161
-
162
- _this.formData = _objectSpread({}, _this.formData, {}, values); // this.props.actions.setData('formData', this.formData);
163
-
128
+ callback = _ref2.callback,
129
+ _ref2$showLoading = _ref2.showLoading,
130
+ showLoading = _ref2$showLoading === void 0 ? true : _ref2$showLoading;
131
+ _this.formData = _objectSpread(_objectSpread({}, _this.formData), values);
132
+ // this.props.actions.setData('formData', this.formData);
164
133
  return _this.fetchData(_this.formData, {
165
134
  callback: callback,
166
135
  showLoading: showLoading
167
136
  });
168
137
  };
169
-
170
138
  _this.onTableChange = function (pagination, filters, sorter) {
171
139
  var _this$props2 = _this.props,
172
- actions = _this$props2.actions,
173
- localPagination = _this$props2.localPagination;
140
+ actions = _this$props2.actions,
141
+ localPagination = _this$props2.localPagination;
174
142
  var tableParams = {
175
143
  pageSize: pagination.pageSize,
176
144
  current: pagination.current,
@@ -178,17 +146,17 @@ function (_React$PureComponent) {
178
146
  sorter: isEmpty(sorter) ? undefined : sorter
179
147
  };
180
148
  console.log('onTableChange...', actions.getSubmittedFormData(), _this.formData);
181
- Object.assign(_this.formData, tableParams); // 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
182
- // 所以暂时排序有使用者自己处理
149
+ Object.assign(_this.formData, tableParams);
183
150
 
151
+ // 排序变化暂时不处理,因为有时可能是前端sorter不需要走请求
152
+ // 所以暂时排序有使用者自己处理
184
153
  if (!localPagination) {
185
- _this.fetchData(_objectSpread({}, actions.getSubmittedFormData(), {}, tableParams));
186
-
154
+ _this.fetchData(_objectSpread(_objectSpread({}, actions.getSubmittedFormData()), tableParams));
187
155
  return;
188
156
  }
157
+ var dataSource = _this.state.dataSource;
189
158
 
190
- var dataSource = _this.state.dataSource; // 前端本地分页
191
-
159
+ // 前端本地分页
192
160
  if (localPagination) {
193
161
  _this.setState({
194
162
  dataSource: dataSource,
@@ -203,26 +171,21 @@ function (_React$PureComponent) {
203
171
  });
204
172
  }
205
173
  };
206
-
207
174
  _this.onTableBodyScroll = throttle(function (evt) {
208
175
  console.log('onTableBodyScroll', evt.target.scrollTop);
209
-
210
176
  _this.updateIsScrollToBottom(evt.target);
211
177
  }, 50);
212
-
213
178
  _this.updateIsScrollToBottom = function (tableBody) {
214
179
  var isScrollToBottom = function isScrollToBottom(tableBody) {
215
180
  var scrollHeight = tableBody.scrollHeight,
216
- scrollTop = tableBody.scrollTop,
217
- offsetHeight = tableBody.offsetHeight;
181
+ scrollTop = tableBody.scrollTop,
182
+ offsetHeight = tableBody.offsetHeight;
218
183
  return scrollHeight === scrollTop + offsetHeight;
219
184
  };
220
-
221
185
  _this.setState({
222
186
  hasScrollToBottom: isScrollToBottom(tableBody)
223
187
  });
224
188
  };
225
-
226
189
  _this.state = {
227
190
  loading: false,
228
191
  dataSource: [],
@@ -232,48 +195,40 @@ function (_React$PureComponent) {
232
195
  total: 0
233
196
  },
234
197
  scroll: props.scroll,
235
- hasScrollToBottom: !((_props$scroll = props.scroll) == null ? void 0 : _props$scroll.y)
198
+ hasScrollToBottom: !((_props$scroll = props.scroll) != null && _props$scroll.y)
236
199
  };
237
- _this.tableRef = createRef();
200
+ _this.tableRef = /*#__PURE__*/createRef();
238
201
  var _actions = props.actions;
239
-
240
202
  _actions.on('search', _this.onSearch);
241
-
242
203
  _actions.on('setTableDataSource', _this.updateDataSource);
243
-
244
204
  _actions.on('setPagination', _this.updatePagination);
245
-
246
205
  _actions.on('setFormData', _this.onFormChange);
247
-
248
206
  return _this;
249
207
  }
250
-
251
208
  _createClass(QueryList, [{
252
209
  key: "render",
253
210
  value: function render() {
254
211
  var _this$props3 = this.props,
255
- columns = _this$props3.columns,
256
- children = _this$props3.children,
257
- pagination = _this$props3.pagination,
258
- _this$props3$localPag = _this$props3.localPagination,
259
- localPagination = _this$props3$localPag === void 0 ? false : _this$props3$localPag,
260
- _this$props3$paginati = _this$props3.paginationSticky,
261
- paginationSticky = _this$props3$paginati === void 0 ? false : _this$props3$paginati,
262
- _this$props3$classNam = _this$props3.className,
263
- className = _this$props3$classNam === void 0 ? '' : _this$props3$classNam,
264
- qlsProps = _this$props3.qlsProps,
265
- rest = _objectWithoutProperties(_this$props3, ["columns", "children", "pagination", "localPagination", "paginationSticky", "className", "qlsProps"]);
266
-
212
+ columns = _this$props3.columns,
213
+ children = _this$props3.children,
214
+ pagination = _this$props3.pagination,
215
+ _this$props3$localPag = _this$props3.localPagination,
216
+ localPagination = _this$props3$localPag === void 0 ? false : _this$props3$localPag,
217
+ _this$props3$paginati = _this$props3.paginationSticky,
218
+ paginationSticky = _this$props3$paginati === void 0 ? false : _this$props3$paginati,
219
+ _this$props3$classNam = _this$props3.className,
220
+ className = _this$props3$classNam === void 0 ? '' : _this$props3$classNam,
221
+ qlsProps = _this$props3.qlsProps,
222
+ rest = _objectWithoutProperties(_this$props3, _excluded);
267
223
  var _this$state = this.state,
268
- dataSource = _this$state.dataSource,
269
- loading = _this$state.loading,
270
- _this$state$expandedR = _this$state.expandedRowKeys,
271
- expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
272
- scroll = _this$state.scroll,
273
- hasScrollToBottom = _this$state.hasScrollToBottom;
224
+ dataSource = _this$state.dataSource,
225
+ loading = _this$state.loading,
226
+ _this$state$expandedR = _this$state.expandedRowKeys,
227
+ expandedRowKeys = _this$state$expandedR === void 0 ? [] : _this$state$expandedR,
228
+ scroll = _this$state.scroll,
229
+ hasScrollToBottom = _this$state.hasScrollToBottom;
274
230
  var hasPagination = typeof pagination !== 'undefined' ? pagination : true;
275
-
276
- var paginationInfo = _objectSpread({}, this.state.pagination, {
231
+ var paginationInfo = _objectSpread(_objectSpread({}, this.state.pagination), {}, {
277
232
  // size: 'small',
278
233
  showQuickJumper: true,
279
234
  showSizeChanger: true,
@@ -281,20 +236,18 @@ function (_React$PureComponent) {
281
236
  return getText('totalRecords', getLanguage(), total);
282
237
  }
283
238
  }, pagination || {});
284
-
285
239
  var expandProps = _objectSpread({}, rest.defaultExpandAllRows ? {
286
240
  expandedRowKeys: expandedRowKeys,
287
241
  onExpandedRowsChange: this.onExpandedRowsChange
288
242
  } : {});
289
-
290
- return React.createElement("div", {
243
+ return /*#__PURE__*/React.createElement("div", {
291
244
  className: cn("tnt-querylistscene-list ".concat(className), {
292
245
  paginationSticky: paginationSticky,
293
246
  hasScrollToBottom: hasScrollToBottom
294
247
  })
295
- }, React.createElement(_Spin, {
248
+ }, /*#__PURE__*/React.createElement(_Spin, {
296
249
  spinning: loading
297
- }, React.createElement(Table, _extends({
250
+ }, /*#__PURE__*/React.createElement(Table, _extends({
298
251
  ref: this.tableRef
299
252
  }, expandProps, rest, columns ? {
300
253
  columns: columns
@@ -309,13 +262,11 @@ function (_React$PureComponent) {
309
262
  key: "componentDidMount",
310
263
  value: function componentDidMount() {
311
264
  var _this2 = this,
312
- _this$state$scroll;
313
-
265
+ _this$state$scroll;
314
266
  var _this$props4 = this.props,
315
- qlsProps = _this$props4.qlsProps,
316
- actions = _this$props4.actions;
317
- this.formData = _objectSpread({}, actions.getFormData() || {}, {}, qlsProps.memory ? actions.getPagination() : {});
318
-
267
+ qlsProps = _this$props4.qlsProps,
268
+ actions = _this$props4.actions;
269
+ this.formData = _objectSpread(_objectSpread({}, actions.getFormData() || {}), qlsProps.memory ? actions.getPagination() : {});
319
270
  if (!qlsProps.initSearch) {
320
271
  // 默认进来不请求
321
272
  this.fetchData(this.formData)["finally"](function () {
@@ -339,15 +290,12 @@ function (_React$PureComponent) {
339
290
  }, ms);
340
291
  }
341
292
  };
342
-
343
293
  doIntervalQuery(qlsProps.interval);
344
294
  }
345
295
  });
346
296
  }
347
-
348
- if ((_this$state$scroll = this.state.scroll) == null ? void 0 : _this$state$scroll.y) {
297
+ if ((_this$state$scroll = this.state.scroll) != null && _this$state$scroll.y) {
349
298
  window.addEventListener('resize', this.onWindowResize);
350
-
351
299
  if (this.tableRef.current) {
352
300
  // table内垂直滚动,需要动态设置分页组件上阴影样式
353
301
  var tableBody = findDOMNode(this.tableRef.current).querySelector('.ant-table-body');
@@ -370,9 +318,7 @@ function (_React$PureComponent) {
370
318
  this.timmer && clearTimeout(this.timmer);
371
319
  }
372
320
  }]);
373
-
374
321
  return QueryList;
375
322
  }(React.PureComponent);
376
-
377
323
  export { QueryList as default };
378
324
  ;
@@ -1,135 +1,103 @@
1
- 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); }
2
-
3
- function _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); }
4
-
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["className", "actions", "extraActions", "extralActions", "qlsProps"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
5
4
  function _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; }
6
-
7
5
  function _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; }
8
-
9
- function 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; }
10
-
11
- function _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; }
12
-
13
- function _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; }
14
-
6
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
9
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
-
17
- function _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); } }
18
-
19
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
20
-
21
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
22
-
10
+ function _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, _toPropertyKey(descriptor.key), descriptor); } }
11
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
+ function _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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
15
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
17
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
23
18
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
-
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
-
27
- function _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); }
28
-
29
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
30
-
19
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
20
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
31
21
  import React from 'react';
32
22
  import classnames from 'classnames';
33
23
  import Form from '../QueryForm';
34
24
  var clsPrefix = 'tnt-querylistscene-queryform';
35
-
36
- var QueryForm =
37
- /*#__PURE__*/
38
- function (_React$PureComponent) {
25
+ var QueryForm = /*#__PURE__*/function (_React$PureComponent) {
39
26
  _inherits(QueryForm, _React$PureComponent);
40
-
27
+ var _super = _createSuper(QueryForm);
41
28
  function QueryForm(props) {
42
29
  var _this;
43
-
44
30
  _classCallCheck(this, QueryForm);
45
-
46
- _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));
47
-
31
+ _this = _super.call(this, props);
48
32
  _this.onSearch = function () {
49
33
  var _this$props = _this.props,
50
- onSearch = _this$props.onSearch,
51
- actions = _this$props.actions;
34
+ onSearch = _this$props.onSearch,
35
+ actions = _this$props.actions;
52
36
  var values = actions.getFormData();
53
-
54
- var params = _objectSpread({}, values, {
37
+ var params = _objectSpread(_objectSpread({}, values), {}, {
55
38
  current: 1
56
- }); // memory 与 url解析setForm时 监听事件异步
57
-
39
+ });
58
40
 
41
+ // memory 与 url解析setForm时 监听事件异步
59
42
  actions.setData('formData', values);
60
43
  Promise.resolve().then(function () {
61
44
  onSearch && onSearch(params);
62
45
  actions.emit('search', params);
63
46
  });
64
47
  };
65
-
66
48
  _this.onReset = function () {
67
49
  var _this$props2 = _this.props,
68
- initialValues = _this$props2.initialValues,
69
- onReset = _this$props2.onReset,
70
- actions = _this$props2.actions;
50
+ initialValues = _this$props2.initialValues,
51
+ onReset = _this$props2.onReset,
52
+ actions = _this$props2.actions;
71
53
  actions.setFormData(initialValues, false);
72
54
  onReset && onReset(initialValues);
73
-
74
55
  _this.onSearch();
75
56
  };
76
-
77
57
  _this.onChange = function (newValues, changedInfo) {
78
58
  var _this$props3 = _this.props,
79
- onChange = _this$props3.onChange,
80
- actions = _this$props3.actions;
81
-
59
+ onChange = _this$props3.onChange,
60
+ actions = _this$props3.actions;
82
61
  for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
83
62
  rest[_key - 2] = arguments[_key];
84
63
  }
85
-
86
64
  onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));
87
65
  actions.setFormData(newValues, false);
88
66
  };
89
-
90
67
  _this.setFormData = function (data, needSearch) {
91
68
  var actions = _this.props.actions;
92
69
  actions.setData('formData', data);
93
-
94
70
  _this.form.setValues(data);
95
-
96
71
  needSearch && _this.onSearch();
97
72
  };
98
-
99
73
  _this.resetFormData = function (needSearch) {
100
74
  var _this$props4 = _this.props,
101
- initialValues = _this$props4.initialValues,
102
- actions = _this$props4.actions;
75
+ initialValues = _this$props4.initialValues,
76
+ actions = _this$props4.actions;
103
77
  actions.setFormData(initialValues, needSearch);
104
-
105
78
  _this.form.resetValues();
106
79
  };
107
-
108
80
  var _actions = props.actions,
109
- form = props.form;
81
+ form = props.form;
110
82
  _this.form = form || Form.createForm();
111
-
112
83
  _actions.on('setFormData', _this.setFormData);
113
-
114
84
  _actions.on('resetFormData', _this.resetFormData);
115
-
116
85
  return _this;
117
86
  }
118
-
119
87
  _createClass(QueryForm, [{
120
88
  key: "render",
121
89
  value: function render() {
122
90
  var _this$props5 = this.props,
123
- className = _this$props5.className,
124
- actions = _this$props5.actions,
125
- extraActions = _this$props5.extraActions,
126
- extralActions = _this$props5.extralActions,
127
- qlsProps = _this$props5.qlsProps,
128
- props = _objectWithoutProperties(_this$props5, ["className", "actions", "extraActions", "extralActions", "qlsProps"]);
129
-
130
- return React.createElement(Form, _extends({}, props, {
91
+ className = _this$props5.className,
92
+ actions = _this$props5.actions,
93
+ extraActions = _this$props5.extraActions,
94
+ extralActions = _this$props5.extralActions,
95
+ qlsProps = _this$props5.qlsProps,
96
+ props = _objectWithoutProperties(_this$props5, _excluded);
97
+ return /*#__PURE__*/React.createElement(Form, _extends({}, props, {
131
98
  form: this.form,
132
- className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api
99
+ className: classnames(clsPrefix, _defineProperty({}, className, className))
100
+ // 前期拼写错误,导致需要兼容错误的api
133
101
  ,
134
102
  extraActions: extraActions || extralActions,
135
103
  onChange: this.onChange,
@@ -141,13 +109,12 @@ function (_React$PureComponent) {
141
109
  key: "componentDidMount",
142
110
  value: function componentDidMount() {
143
111
  var _this$props6 = this.props,
144
- _this$props6$initialV = _this$props6.initialValues,
145
- initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,
146
- actions = _this$props6.actions,
147
- qlsProps = _this$props6.qlsProps;
148
-
112
+ _this$props6$initialV = _this$props6.initialValues,
113
+ initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,
114
+ actions = _this$props6.actions,
115
+ qlsProps = _this$props6.qlsProps;
149
116
  if (qlsProps.memory) {
150
- actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);
117
+ actions.setFormData(_objectSpread(_objectSpread({}, initialValues), actions.getFormData()), false);
151
118
  } else {
152
119
  actions.setData('formData', initialValues);
153
120
  }
@@ -160,10 +127,8 @@ function (_React$PureComponent) {
160
127
  actions.removeListener('resetFormData', this.resetFormData);
161
128
  }
162
129
  }]);
163
-
164
130
  return QueryForm;
165
131
  }(React.PureComponent);
166
-
167
132
  export { QueryForm as default };
168
133
  ;
169
134
  QueryForm.Field = Form.Field;