tntd 1.4.20 → 1.4.22

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