wargerm 0.2.26 → 0.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.zh-CN.md CHANGED
@@ -1,40 +1,40 @@
1
- <!--
2
- * @Author: lijin
3
- * @Date: 2021-10-18 15:22:28
4
- * @LastEditTime: 2021-11-05 09:25:52
5
- * @LastEditors: lijin
6
- * @Description:
7
- * @FilePath: \wargerm\README.zh-CN.md
8
- * 可以输入预定的版权声明、个性签名、空行等
9
- -->
10
-
11
- ## 📒 目录介绍
12
-
13
- ```
14
- ├── docs 文档存放路径
15
- │ ├── index.md 首页展示
16
- │ └── **.** 网站目录文档
17
- ├── src 组件主目录
18
- │ ├── index.ts 组件注册
19
- │ └── Foo 组件开发
20
- ├── .eslintrc.js eslint 配置
21
- ├── .fatherrc.ts father 配置
22
- ├── .umirc.ts dumi 配置
23
- └── tsconfig.json typescript 配置
24
- ```
25
-
26
- 其余文件可自行查阅了解。
27
-
28
- ## 🤖 命令介绍
29
-
30
- | 名称 | 描述 | 备注 |
31
- | ----------------------- | -------------- | ----------------------------- |
32
- | `npm run dev` | 项目启动 | - |
33
- | `npm run test` | 组件测试 | - |
34
- | `npm run test:coverage` | 代码覆盖率查看 | - |
35
- | `npm run prettier` | 代码美化 | - |
36
- | `npm run build` | 组件打包 | - |
37
- | `npm run release` | 组件打包发布 | - |
38
- | `npm run docs:build` | 文档打包 | - |
39
- | `npm run docs:deploy` | 文档发布 | 这里默认是使用了 GitHub Pages |
40
- | `npm run deploy` | 文档打包发布 | - |
1
+ <!--
2
+ * @Author: lijin
3
+ * @Date: 2021-10-18 15:22:28
4
+ * @LastEditTime: 2021-11-05 09:25:52
5
+ * @LastEditors: lijin
6
+ * @Description:
7
+ * @FilePath: \wargerm\README.zh-CN.md
8
+ * 可以输入预定的版权声明、个性签名、空行等
9
+ -->
10
+
11
+ ## 📒 目录介绍
12
+
13
+ ```
14
+ ├── docs 文档存放路径
15
+ │ ├── index.md 首页展示
16
+ │ └── **.** 网站目录文档
17
+ ├── src 组件主目录
18
+ │ ├── index.ts 组件注册
19
+ │ └── Foo 组件开发
20
+ ├── .eslintrc.js eslint 配置
21
+ ├── .fatherrc.ts father 配置
22
+ ├── .umirc.ts dumi 配置
23
+ └── tsconfig.json typescript 配置
24
+ ```
25
+
26
+ 其余文件可自行查阅了解。
27
+
28
+ ## 🤖 命令介绍
29
+
30
+ | 名称 | 描述 | 备注 |
31
+ | ----------------------- | -------------- | ----------------------------- |
32
+ | `npm run dev` | 项目启动 | - |
33
+ | `npm run test` | 组件测试 | - |
34
+ | `npm run test:coverage` | 代码覆盖率查看 | - |
35
+ | `npm run prettier` | 代码美化 | - |
36
+ | `npm run build` | 组件打包 | - |
37
+ | `npm run release` | 组件打包发布 | - |
38
+ | `npm run docs:build` | 文档打包 | - |
39
+ | `npm run docs:deploy` | 文档发布 | 这里默认是使用了 GitHub Pages |
40
+ | `npm run deploy` | 文档打包发布 | - |
@@ -39,6 +39,7 @@ export interface Isearch {
39
39
  filterType?: 'query' | 'light';
40
40
  searchText?: string;
41
41
  resetText?: string;
42
+ hideResetBtn?: boolean;
42
43
  submitText?: string;
43
44
  hideSubmit?: boolean;
44
45
  transform?: (value: any) => any;
@@ -0,0 +1,24 @@
1
+ export default class WebsocketHeart {
2
+ WebSocket: any;
3
+ url: any;
4
+ options: any;
5
+ onopenCB: any;
6
+ onerrorCB: any;
7
+ onmessageCB: any;
8
+ oncloseCB: any;
9
+ HeartBeat: any;
10
+ stopTimer: any;
11
+ websock: any;
12
+ lockReconnect: any;
13
+ heartCheck: any;
14
+ constructor({ WebSocket, url, options, onopen, onerror, onmessage, onclose, HeartBeat, }: any);
15
+ init: () => void;
16
+ initWebSocket: () => void;
17
+ websocketOnopen: () => void;
18
+ websocketOnerror: (e: any) => void;
19
+ websocketOnmessage: (e: any) => void;
20
+ websocketOnclose: (e: string) => void;
21
+ send: (text: any) => void;
22
+ reconnect: () => void;
23
+ heartCheckFun: () => void;
24
+ }
package/dist/index.css CHANGED
@@ -210,7 +210,7 @@
210
210
  justify-content: center;
211
211
  position: relative;
212
212
  z-index: 2;
213
- height: 32px;
213
+ min-height: 32px;
214
214
  }
215
215
  .container .tbody {
216
216
  overflow: auto;
@@ -220,7 +220,7 @@
220
220
  .container .tbody .tr {
221
221
  padding-left: 6px;
222
222
  width: 100%;
223
- height: 32px;
223
+ min-height: 32px;
224
224
  display: flex;
225
225
  margin-bottom: 17px;
226
226
  position: relative;
@@ -426,7 +426,7 @@
426
426
  justify-content: center;
427
427
  position: relative;
428
428
  z-index: 2;
429
- height: 32px;
429
+ min-height: 32px;
430
430
  }
431
431
  [data-prefers-color='light'] .container .tbody {
432
432
  overflow: auto;
@@ -436,7 +436,7 @@
436
436
  [data-prefers-color='light'] .container .tbody .tr {
437
437
  padding-left: 6px;
438
438
  width: 100%;
439
- height: 32px;
439
+ min-height: 32px;
440
440
  display: flex;
441
441
  margin-bottom: 17px;
442
442
  position: relative;
@@ -515,12 +515,12 @@
515
515
  margin-top: 8px;
516
516
  }
517
517
  .w-frame-box-table.container .tbody .frame {
518
- height: 28px;
518
+ min-height: 28px;
519
519
  margin-bottom: 8px;
520
520
  border: none;
521
521
  }
522
522
  .w-frame-box-table.container .tbody .frame .tr {
523
- height: 28px;
523
+ min-height: 28px;
524
524
  margin-bottom: 0;
525
525
  background: rgba(16, 97, 139, 0.1);
526
526
  }
@@ -1780,7 +1780,6 @@ button.swiper-pagination-bullet {
1780
1780
 
1781
1781
  .frame {
1782
1782
  width: 40px;
1783
- height: 40px;
1784
1783
  background: rgba(15, 72, 114, 0.1);
1785
1784
  border: 1px solid rgba(156, 208, 239, 0.4);
1786
1785
  position: relative;
package/dist/index.d.ts CHANGED
@@ -23,3 +23,4 @@ export { default as Modal } from './components/Modal';
23
23
  export { default as ModalForm } from './components/ModalForm';
24
24
  export { default as TabelCard } from './components/TabelCard';
25
25
  export { default as Cascader } from './components/Cascader';
26
+ export { default as WebsocketHeart } from './components/WebsocketHeart';
@@ -210,7 +210,7 @@
210
210
  justify-content: center;
211
211
  position: relative;
212
212
  z-index: 2;
213
- height: 32px;
213
+ min-height: 32px;
214
214
  }
215
215
  .container .tbody {
216
216
  overflow: auto;
@@ -220,7 +220,7 @@
220
220
  .container .tbody .tr {
221
221
  padding-left: 6px;
222
222
  width: 100%;
223
- height: 32px;
223
+ min-height: 32px;
224
224
  display: flex;
225
225
  margin-bottom: 17px;
226
226
  position: relative;
@@ -426,7 +426,7 @@
426
426
  justify-content: center;
427
427
  position: relative;
428
428
  z-index: 2;
429
- height: 32px;
429
+ min-height: 32px;
430
430
  }
431
431
  [data-prefers-color='light'] .container .tbody {
432
432
  overflow: auto;
@@ -436,7 +436,7 @@
436
436
  [data-prefers-color='light'] .container .tbody .tr {
437
437
  padding-left: 6px;
438
438
  width: 100%;
439
- height: 32px;
439
+ min-height: 32px;
440
440
  display: flex;
441
441
  margin-bottom: 17px;
442
442
  position: relative;
@@ -515,12 +515,12 @@
515
515
  margin-top: 8px;
516
516
  }
517
517
  .w-frame-box-table.container .tbody .frame {
518
- height: 28px;
518
+ min-height: 28px;
519
519
  margin-bottom: 8px;
520
520
  border: none;
521
521
  }
522
522
  .w-frame-box-table.container .tbody .frame .tr {
523
- height: 28px;
523
+ min-height: 28px;
524
524
  margin-bottom: 0;
525
525
  background: rgba(16, 97, 139, 0.1);
526
526
  }
@@ -1780,7 +1780,6 @@ button.swiper-pagination-bullet {
1780
1780
 
1781
1781
  .frame {
1782
1782
  width: 40px;
1783
- height: 40px;
1784
1783
  background: rgba(15, 72, 114, 0.1);
1785
1784
  border: 1px solid rgba(156, 208, 239, 0.4);
1786
1785
  position: relative;
package/dist/index.esm.js CHANGED
@@ -56,14 +56,9 @@ function ownKeys(object, enumerableOnly) {
56
56
 
57
57
  if (Object.getOwnPropertySymbols) {
58
58
  var symbols = Object.getOwnPropertySymbols(object);
59
-
60
- if (enumerableOnly) {
61
- symbols = symbols.filter(function (sym) {
62
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
63
- });
64
- }
65
-
66
- keys.push.apply(keys, symbols);
59
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
60
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
61
+ })), keys.push.apply(keys, symbols);
67
62
  }
68
63
 
69
64
  return keys;
@@ -71,19 +66,12 @@ function ownKeys(object, enumerableOnly) {
71
66
 
72
67
  function _objectSpread2(target) {
73
68
  for (var i = 1; i < arguments.length; i++) {
74
- var source = arguments[i] != null ? arguments[i] : {};
75
-
76
- if (i % 2) {
77
- ownKeys(Object(source), true).forEach(function (key) {
78
- _defineProperty(target, key, source[key]);
79
- });
80
- } else if (Object.getOwnPropertyDescriptors) {
81
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
82
- } else {
83
- ownKeys(Object(source)).forEach(function (key) {
84
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
85
- });
86
- }
69
+ var source = null != arguments[i] ? arguments[i] : {};
70
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
71
+ _defineProperty(target, key, source[key]);
72
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
73
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
74
+ });
87
75
  }
88
76
 
89
77
  return target;
@@ -92,17 +80,11 @@ function _objectSpread2(target) {
92
80
  function _typeof(obj) {
93
81
  "@babel/helpers - typeof";
94
82
 
95
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
96
- _typeof = function (obj) {
97
- return typeof obj;
98
- };
99
- } else {
100
- _typeof = function (obj) {
101
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
102
- };
103
- }
104
-
105
- return _typeof(obj);
83
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
84
+ return typeof obj;
85
+ } : function (obj) {
86
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
87
+ }, _typeof(obj);
106
88
  }
107
89
 
108
90
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -160,6 +142,9 @@ function _defineProperties(target, props) {
160
142
  function _createClass(Constructor, protoProps, staticProps) {
161
143
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
162
144
  if (staticProps) _defineProperties(Constructor, staticProps);
145
+ Object.defineProperty(Constructor, "prototype", {
146
+ writable: false
147
+ });
163
148
  return Constructor;
164
149
  }
165
150
 
@@ -201,12 +186,15 @@ function _inherits(subClass, superClass) {
201
186
  throw new TypeError("Super expression must either be null or a function");
202
187
  }
203
188
 
204
- subClass.prototype = Object.create(superClass && superClass.prototype, {
205
- constructor: {
206
- value: subClass,
207
- writable: true,
208
- configurable: true
209
- }
189
+ Object.defineProperty(subClass, "prototype", {
190
+ value: Object.create(superClass && superClass.prototype, {
191
+ constructor: {
192
+ value: subClass,
193
+ writable: true,
194
+ configurable: true
195
+ }
196
+ }),
197
+ writable: false
210
198
  });
211
199
  if (superClass) _setPrototypeOf(subClass, superClass);
212
200
  }
@@ -8795,7 +8783,8 @@ var WForm = function WForm(props, ref) {
8795
8783
  });
8796
8784
  return /*#__PURE__*/React.createElement(_Form, _objectSpread2({
8797
8785
  style: {
8798
- marginBottom: '20px'
8786
+ marginBottom: '20px',
8787
+ width: '100%'
8799
8788
  },
8800
8789
  onFinish: handleSearch,
8801
8790
  onValuesChange: function onValuesChange(changedValues, allValues) {
@@ -8803,9 +8792,7 @@ var WForm = function WForm(props, ref) {
8803
8792
  setchangedValues(changedValues);
8804
8793
  },
8805
8794
  form: form
8806
- }, extraProps), /*#__PURE__*/React.createElement(_Row, null, filterForm), /*#__PURE__*/React.createElement(_Row, null, filterExtraColumnsForm), search && search.hideSubmit ? null : /*#__PURE__*/React.createElement(_Row, {
8807
- justify: "end"
8808
- }, /*#__PURE__*/React.createElement(_Col, {
8795
+ }, extraProps), /*#__PURE__*/React.createElement(_Row, null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React.createElement(_Col, {
8809
8796
  style: {
8810
8797
  paddingLeft: '12px',
8811
8798
  paddingRight: '12px'
@@ -8821,14 +8808,14 @@ var WForm = function WForm(props, ref) {
8821
8808
  },
8822
8809
  htmlType: "submit",
8823
8810
  icon: /*#__PURE__*/React.createElement(SearchOutlined, null)
8824
- }, search && search.searchText ? search.searchText : '提交'), /*#__PURE__*/React.createElement(WButton, {
8811
+ }, search && search.searchText ? search.searchText : '提交')].concat(_toConsumableArray(search.hideResetBtn ? [] : [/*#__PURE__*/React.createElement(WButton, {
8825
8812
  type: "primary",
8826
8813
  style: {
8827
8814
  marginRight: '20px'
8828
8815
  },
8829
8816
  onClick: handleRest,
8830
8817
  icon: /*#__PURE__*/React.createElement(ReloadOutlined, null)
8831
- }, search && search.resetText ? search.resetText : '重置')]), !search ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WButton, {
8818
+ }, search && search.resetText ? search.resetText : '重置')]))), !search ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WButton, {
8832
8819
  type: "primary",
8833
8820
  style: {
8834
8821
  marginRight: '20px'
@@ -8849,14 +8836,14 @@ var WForm = function WForm(props, ref) {
8849
8836
  },
8850
8837
  htmlType: "submit",
8851
8838
  icon: /*#__PURE__*/React.createElement(SearchOutlined, null)
8852
- }, "\u63D0\u4EA4"), /*#__PURE__*/React.createElement(WButton, {
8839
+ }, search && search.searchText ? search.searchText : '提交'), search.hideResetBtn ? null : /*#__PURE__*/React.createElement(WButton, {
8853
8840
  type: "primary",
8854
8841
  style: {
8855
8842
  marginRight: '20px'
8856
8843
  },
8857
8844
  icon: /*#__PURE__*/React.createElement(ReloadOutlined, null),
8858
8845
  onClick: handleRest
8859
- }, "\u91CD\u7F6E")) : null)))));
8846
+ }, search && search.resetText ? search.resetText : '重置')) : null)))));
8860
8847
  };
8861
8848
 
8862
8849
  var WForm$1 = /*#__PURE__*/React.forwardRef(WForm);
@@ -10340,14 +10327,9 @@ function ownKeys$1(object, enumerableOnly) {
10340
10327
 
10341
10328
  if (Object.getOwnPropertySymbols) {
10342
10329
  var symbols = Object.getOwnPropertySymbols(object);
10343
-
10344
- if (enumerableOnly) {
10345
- symbols = symbols.filter(function (sym) {
10346
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10347
- });
10348
- }
10349
-
10350
- keys.push.apply(keys, symbols);
10330
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
10331
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10332
+ })), keys.push.apply(keys, symbols);
10351
10333
  }
10352
10334
 
10353
10335
  return keys;
@@ -10355,19 +10337,12 @@ function ownKeys$1(object, enumerableOnly) {
10355
10337
 
10356
10338
  function _objectSpread2$1(target) {
10357
10339
  for (var i = 1; i < arguments.length; i++) {
10358
- var source = arguments[i] != null ? arguments[i] : {};
10359
-
10360
- if (i % 2) {
10361
- ownKeys$1(Object(source), true).forEach(function (key) {
10362
- _defineProperty$1(target, key, source[key]);
10363
- });
10364
- } else if (Object.getOwnPropertyDescriptors) {
10365
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
10366
- } else {
10367
- ownKeys$1(Object(source)).forEach(function (key) {
10368
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
10369
- });
10370
- }
10340
+ var source = null != arguments[i] ? arguments[i] : {};
10341
+ i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
10342
+ _defineProperty$1(target, key, source[key]);
10343
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
10344
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
10345
+ });
10371
10346
  }
10372
10347
 
10373
10348
  return target;
@@ -11524,4 +11499,160 @@ var TabelCard = function TabelCard(props, ref) {
11524
11499
 
11525
11500
  var index$1 = /*#__PURE__*/React.forwardRef(TabelCard);
11526
11501
 
11527
- export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, Index$c as Card, WCascader as Cascader, Index$4 as Checkbox, Index$8 as CountUp, Index$2 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, Modal, ModalForm$1 as ModalForm, Index$7 as Number, NumericInput, Index$3 as Radio, Index$1 as Select, Index$a as Swiper, WSwitch as Switch, index$1 as TabelCard, Table, Index$5 as TreeSelect, Index$6 as WDatePicker, WForm$1 as WForm };
11502
+ var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
11503
+ var _this = this;
11504
+
11505
+ var WebSocket = _ref.WebSocket,
11506
+ url = _ref.url,
11507
+ options = _ref.options,
11508
+ onopen = _ref.onopen,
11509
+ onerror = _ref.onerror,
11510
+ onmessage = _ref.onmessage,
11511
+ onclose = _ref.onclose,
11512
+ HeartBeat = _ref.HeartBeat;
11513
+
11514
+ _classCallCheck(this, WebsocketHeart);
11515
+
11516
+ this.WebSocket = void 0;
11517
+ this.url = void 0;
11518
+ this.options = void 0;
11519
+ this.onopenCB = void 0;
11520
+ this.onerrorCB = void 0;
11521
+ this.onmessageCB = void 0;
11522
+ this.oncloseCB = void 0;
11523
+ this.HeartBeat = void 0;
11524
+ this.stopTimer = void 0;
11525
+ this.websock = void 0;
11526
+ this.lockReconnect = void 0;
11527
+ this.heartCheck = void 0;
11528
+
11529
+ this.init = function () {
11530
+ _this.initWebSocket();
11531
+
11532
+ _this.heartCheckFun();
11533
+ };
11534
+
11535
+ this.initWebSocket = function () {
11536
+ _this.websock = new _this.WebSocket(_this.url, _this.options);
11537
+
11538
+ try {
11539
+ if ('WebSocket' in window) {
11540
+ _this.websock.onopen = _this.websocketOnopen;
11541
+ _this.websock.onerror = _this.websocketOnerror;
11542
+ _this.websock.onmessage = _this.websocketOnmessage;
11543
+ _this.websock.onclose = _this.websocketOnclose;
11544
+ }
11545
+ } catch (error) {
11546
+ _this.websock.on('open', _this.websocketOnopen);
11547
+
11548
+ _this.websock.on('error', _this.websocketOnerror);
11549
+
11550
+ _this.websock.on('close', _this.websocketOnclose);
11551
+
11552
+ _this.websock.on('message', _this.websocketOnmessage);
11553
+ }
11554
+ };
11555
+
11556
+ this.websocketOnopen = function () {
11557
+ console.log('WebSocket连接成功');
11558
+
11559
+ _this.onopenCB(); //心跳检测重置
11560
+
11561
+
11562
+ _this.heartCheck.reset().start();
11563
+ };
11564
+
11565
+ this.websocketOnerror = function (e) {
11566
+ console.log('WebSocket连接发生错误', e);
11567
+
11568
+ _this.onerrorCB(e);
11569
+
11570
+ _this.reconnect();
11571
+ };
11572
+
11573
+ this.websocketOnmessage = function (e) {
11574
+ console.log('-----接收消息-------', e); // const data = e.data //解析对象
11575
+ // To handle
11576
+
11577
+ _this.onmessageCB(e); //心跳检测重置
11578
+
11579
+
11580
+ _this.heartCheck.reset().start();
11581
+ };
11582
+
11583
+ this.websocketOnclose = function (e) {
11584
+ _this.oncloseCB(e);
11585
+
11586
+ if (e) {
11587
+ console.log('connection closed (' + e + ')');
11588
+ }
11589
+
11590
+ _this.reconnect();
11591
+ };
11592
+
11593
+ this.send = function (text) {
11594
+ // 数据发送
11595
+ try {
11596
+ _this.websock.send(text);
11597
+ } catch (err) {
11598
+ console.log('send failed (' + err + ')');
11599
+ }
11600
+ };
11601
+
11602
+ this.reconnect = function () {
11603
+ var that = _this;
11604
+ if (that.lockReconnect) return;
11605
+ that.lockReconnect = true; //没连接上会一直重连,设置延迟避免请求过多
11606
+
11607
+ setTimeout(function () {
11608
+ console.info('尝试重连...');
11609
+ that.initWebSocket();
11610
+ that.lockReconnect = false;
11611
+ }, 5000);
11612
+ };
11613
+
11614
+ this.heartCheckFun = function () {
11615
+ var that = _this; //心跳检测,每20s心跳一次
11616
+
11617
+ that.heartCheck = {
11618
+ timeout: 20000,
11619
+ timeoutObj: null,
11620
+ serverTimeoutObj: null,
11621
+ reset: function reset() {
11622
+ clearTimeout(this.timeoutObj); //clearTimeout(this.serverTimeoutObj);
11623
+
11624
+ return this;
11625
+ },
11626
+ start: function start() {
11627
+ this.timeoutObj = setTimeout(function () {
11628
+ //这里发送一个心跳,后端收到后,返回一个心跳消息,
11629
+ //onmessage拿到返回的心跳就说明连接正常
11630
+ that.send(that.HeartBeat);
11631
+ console.info('客户端发送心跳'); //self.serverTimeoutObj = setTimeout(function(){//如果超过一定时间还没重置,说明后端主动断开了
11632
+ // that.websock.close();//如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
11633
+ //}, self.timeout)
11634
+ }, this.timeout);
11635
+ }
11636
+ };
11637
+ };
11638
+
11639
+ this.WebSocket = WebSocket || WebSocket;
11640
+ this.url = url;
11641
+ this.options = options !== null && options !== void 0 ? options : [];
11642
+
11643
+ this.onopenCB = onopen || function () {};
11644
+
11645
+ this.onerrorCB = onerror || function () {};
11646
+
11647
+ this.onmessageCB = onmessage || function () {};
11648
+
11649
+ this.oncloseCB = onclose || function () {};
11650
+
11651
+ this.HeartBeat = HeartBeat || 'HeartBeat';
11652
+ this.stopTimer = false;
11653
+ this.websock = null;
11654
+ this.lockReconnect = false;
11655
+ this.heartCheck = null;
11656
+ });
11657
+
11658
+ export { Index$9 as AutoScroll, Index$b as Breadcrumb, WButton as Button, Index$c as Card, WCascader as Cascader, Index$4 as Checkbox, Index$8 as CountUp, Index$2 as DatePicker, index as IconFont, Index as Input, WInputNumber as InputNumber, Modal, ModalForm$1 as ModalForm, Index$7 as Number, NumericInput, Index$3 as Radio, Index$1 as Select, Index$a as Swiper, WSwitch as Switch, index$1 as TabelCard, Table, Index$5 as TreeSelect, Index$6 as WDatePicker, WForm$1 as WForm, WebsocketHeart };
package/dist/index.js CHANGED
@@ -90,14 +90,9 @@ function ownKeys(object, enumerableOnly) {
90
90
 
91
91
  if (Object.getOwnPropertySymbols) {
92
92
  var symbols = Object.getOwnPropertySymbols(object);
93
-
94
- if (enumerableOnly) {
95
- symbols = symbols.filter(function (sym) {
96
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
97
- });
98
- }
99
-
100
- keys.push.apply(keys, symbols);
93
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
94
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
95
+ })), keys.push.apply(keys, symbols);
101
96
  }
102
97
 
103
98
  return keys;
@@ -105,19 +100,12 @@ function ownKeys(object, enumerableOnly) {
105
100
 
106
101
  function _objectSpread2(target) {
107
102
  for (var i = 1; i < arguments.length; i++) {
108
- var source = arguments[i] != null ? arguments[i] : {};
109
-
110
- if (i % 2) {
111
- ownKeys(Object(source), true).forEach(function (key) {
112
- _defineProperty(target, key, source[key]);
113
- });
114
- } else if (Object.getOwnPropertyDescriptors) {
115
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
116
- } else {
117
- ownKeys(Object(source)).forEach(function (key) {
118
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
119
- });
120
- }
103
+ var source = null != arguments[i] ? arguments[i] : {};
104
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
105
+ _defineProperty(target, key, source[key]);
106
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
107
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
108
+ });
121
109
  }
122
110
 
123
111
  return target;
@@ -126,17 +114,11 @@ function _objectSpread2(target) {
126
114
  function _typeof(obj) {
127
115
  "@babel/helpers - typeof";
128
116
 
129
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
130
- _typeof = function (obj) {
131
- return typeof obj;
132
- };
133
- } else {
134
- _typeof = function (obj) {
135
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
136
- };
137
- }
138
-
139
- return _typeof(obj);
117
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
118
+ return typeof obj;
119
+ } : function (obj) {
120
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
121
+ }, _typeof(obj);
140
122
  }
141
123
 
142
124
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -194,6 +176,9 @@ function _defineProperties(target, props) {
194
176
  function _createClass(Constructor, protoProps, staticProps) {
195
177
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
196
178
  if (staticProps) _defineProperties(Constructor, staticProps);
179
+ Object.defineProperty(Constructor, "prototype", {
180
+ writable: false
181
+ });
197
182
  return Constructor;
198
183
  }
199
184
 
@@ -235,12 +220,15 @@ function _inherits(subClass, superClass) {
235
220
  throw new TypeError("Super expression must either be null or a function");
236
221
  }
237
222
 
238
- subClass.prototype = Object.create(superClass && superClass.prototype, {
239
- constructor: {
240
- value: subClass,
241
- writable: true,
242
- configurable: true
243
- }
223
+ Object.defineProperty(subClass, "prototype", {
224
+ value: Object.create(superClass && superClass.prototype, {
225
+ constructor: {
226
+ value: subClass,
227
+ writable: true,
228
+ configurable: true
229
+ }
230
+ }),
231
+ writable: false
244
232
  });
245
233
  if (superClass) _setPrototypeOf(subClass, superClass);
246
234
  }
@@ -8829,7 +8817,8 @@ var WForm = function WForm(props, ref) {
8829
8817
  });
8830
8818
  return /*#__PURE__*/React__default['default'].createElement(_Form__default['default'], _objectSpread2({
8831
8819
  style: {
8832
- marginBottom: '20px'
8820
+ marginBottom: '20px',
8821
+ width: '100%'
8833
8822
  },
8834
8823
  onFinish: handleSearch,
8835
8824
  onValuesChange: function onValuesChange(changedValues, allValues) {
@@ -8837,9 +8826,7 @@ var WForm = function WForm(props, ref) {
8837
8826
  setchangedValues(changedValues);
8838
8827
  },
8839
8828
  form: form
8840
- }, extraProps), /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], null, filterForm), /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], null, filterExtraColumnsForm), search && search.hideSubmit ? null : /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], {
8841
- justify: "end"
8842
- }, /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], {
8829
+ }, extraProps), /*#__PURE__*/React__default['default'].createElement(_Row__default['default'], null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React__default['default'].createElement(_Col__default['default'], {
8843
8830
  style: {
8844
8831
  paddingLeft: '12px',
8845
8832
  paddingRight: '12px'
@@ -8855,14 +8842,14 @@ var WForm = function WForm(props, ref) {
8855
8842
  },
8856
8843
  htmlType: "submit",
8857
8844
  icon: /*#__PURE__*/React__default['default'].createElement(icons.SearchOutlined, null)
8858
- }, search && search.searchText ? search.searchText : '提交'), /*#__PURE__*/React__default['default'].createElement(WButton, {
8845
+ }, search && search.searchText ? search.searchText : '提交')].concat(_toConsumableArray(search.hideResetBtn ? [] : [/*#__PURE__*/React__default['default'].createElement(WButton, {
8859
8846
  type: "primary",
8860
8847
  style: {
8861
8848
  marginRight: '20px'
8862
8849
  },
8863
8850
  onClick: handleRest,
8864
8851
  icon: /*#__PURE__*/React__default['default'].createElement(icons.ReloadOutlined, null)
8865
- }, search && search.resetText ? search.resetText : '重置')]), !search ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(WButton, {
8852
+ }, search && search.resetText ? search.resetText : '重置')]))), !search ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(WButton, {
8866
8853
  type: "primary",
8867
8854
  style: {
8868
8855
  marginRight: '20px'
@@ -8883,14 +8870,14 @@ var WForm = function WForm(props, ref) {
8883
8870
  },
8884
8871
  htmlType: "submit",
8885
8872
  icon: /*#__PURE__*/React__default['default'].createElement(icons.SearchOutlined, null)
8886
- }, "\u63D0\u4EA4"), /*#__PURE__*/React__default['default'].createElement(WButton, {
8873
+ }, search && search.searchText ? search.searchText : '提交'), search.hideResetBtn ? null : /*#__PURE__*/React__default['default'].createElement(WButton, {
8887
8874
  type: "primary",
8888
8875
  style: {
8889
8876
  marginRight: '20px'
8890
8877
  },
8891
8878
  icon: /*#__PURE__*/React__default['default'].createElement(icons.ReloadOutlined, null),
8892
8879
  onClick: handleRest
8893
- }, "\u91CD\u7F6E")) : null)))));
8880
+ }, search && search.resetText ? search.resetText : '重置')) : null)))));
8894
8881
  };
8895
8882
 
8896
8883
  var WForm$1 = /*#__PURE__*/React__default['default'].forwardRef(WForm);
@@ -10374,14 +10361,9 @@ function ownKeys$1(object, enumerableOnly) {
10374
10361
 
10375
10362
  if (Object.getOwnPropertySymbols) {
10376
10363
  var symbols = Object.getOwnPropertySymbols(object);
10377
-
10378
- if (enumerableOnly) {
10379
- symbols = symbols.filter(function (sym) {
10380
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10381
- });
10382
- }
10383
-
10384
- keys.push.apply(keys, symbols);
10364
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
10365
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10366
+ })), keys.push.apply(keys, symbols);
10385
10367
  }
10386
10368
 
10387
10369
  return keys;
@@ -10389,19 +10371,12 @@ function ownKeys$1(object, enumerableOnly) {
10389
10371
 
10390
10372
  function _objectSpread2$1(target) {
10391
10373
  for (var i = 1; i < arguments.length; i++) {
10392
- var source = arguments[i] != null ? arguments[i] : {};
10393
-
10394
- if (i % 2) {
10395
- ownKeys$1(Object(source), true).forEach(function (key) {
10396
- _defineProperty$1(target, key, source[key]);
10397
- });
10398
- } else if (Object.getOwnPropertyDescriptors) {
10399
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
10400
- } else {
10401
- ownKeys$1(Object(source)).forEach(function (key) {
10402
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
10403
- });
10404
- }
10374
+ var source = null != arguments[i] ? arguments[i] : {};
10375
+ i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) {
10376
+ _defineProperty$1(target, key, source[key]);
10377
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) {
10378
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
10379
+ });
10405
10380
  }
10406
10381
 
10407
10382
  return target;
@@ -11558,6 +11533,162 @@ var TabelCard = function TabelCard(props, ref) {
11558
11533
 
11559
11534
  var index$1 = /*#__PURE__*/React__default['default'].forwardRef(TabelCard);
11560
11535
 
11536
+ var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
11537
+ var _this = this;
11538
+
11539
+ var WebSocket = _ref.WebSocket,
11540
+ url = _ref.url,
11541
+ options = _ref.options,
11542
+ onopen = _ref.onopen,
11543
+ onerror = _ref.onerror,
11544
+ onmessage = _ref.onmessage,
11545
+ onclose = _ref.onclose,
11546
+ HeartBeat = _ref.HeartBeat;
11547
+
11548
+ _classCallCheck(this, WebsocketHeart);
11549
+
11550
+ this.WebSocket = void 0;
11551
+ this.url = void 0;
11552
+ this.options = void 0;
11553
+ this.onopenCB = void 0;
11554
+ this.onerrorCB = void 0;
11555
+ this.onmessageCB = void 0;
11556
+ this.oncloseCB = void 0;
11557
+ this.HeartBeat = void 0;
11558
+ this.stopTimer = void 0;
11559
+ this.websock = void 0;
11560
+ this.lockReconnect = void 0;
11561
+ this.heartCheck = void 0;
11562
+
11563
+ this.init = function () {
11564
+ _this.initWebSocket();
11565
+
11566
+ _this.heartCheckFun();
11567
+ };
11568
+
11569
+ this.initWebSocket = function () {
11570
+ _this.websock = new _this.WebSocket(_this.url, _this.options);
11571
+
11572
+ try {
11573
+ if ('WebSocket' in window) {
11574
+ _this.websock.onopen = _this.websocketOnopen;
11575
+ _this.websock.onerror = _this.websocketOnerror;
11576
+ _this.websock.onmessage = _this.websocketOnmessage;
11577
+ _this.websock.onclose = _this.websocketOnclose;
11578
+ }
11579
+ } catch (error) {
11580
+ _this.websock.on('open', _this.websocketOnopen);
11581
+
11582
+ _this.websock.on('error', _this.websocketOnerror);
11583
+
11584
+ _this.websock.on('close', _this.websocketOnclose);
11585
+
11586
+ _this.websock.on('message', _this.websocketOnmessage);
11587
+ }
11588
+ };
11589
+
11590
+ this.websocketOnopen = function () {
11591
+ console.log('WebSocket连接成功');
11592
+
11593
+ _this.onopenCB(); //心跳检测重置
11594
+
11595
+
11596
+ _this.heartCheck.reset().start();
11597
+ };
11598
+
11599
+ this.websocketOnerror = function (e) {
11600
+ console.log('WebSocket连接发生错误', e);
11601
+
11602
+ _this.onerrorCB(e);
11603
+
11604
+ _this.reconnect();
11605
+ };
11606
+
11607
+ this.websocketOnmessage = function (e) {
11608
+ console.log('-----接收消息-------', e); // const data = e.data //解析对象
11609
+ // To handle
11610
+
11611
+ _this.onmessageCB(e); //心跳检测重置
11612
+
11613
+
11614
+ _this.heartCheck.reset().start();
11615
+ };
11616
+
11617
+ this.websocketOnclose = function (e) {
11618
+ _this.oncloseCB(e);
11619
+
11620
+ if (e) {
11621
+ console.log('connection closed (' + e + ')');
11622
+ }
11623
+
11624
+ _this.reconnect();
11625
+ };
11626
+
11627
+ this.send = function (text) {
11628
+ // 数据发送
11629
+ try {
11630
+ _this.websock.send(text);
11631
+ } catch (err) {
11632
+ console.log('send failed (' + err + ')');
11633
+ }
11634
+ };
11635
+
11636
+ this.reconnect = function () {
11637
+ var that = _this;
11638
+ if (that.lockReconnect) return;
11639
+ that.lockReconnect = true; //没连接上会一直重连,设置延迟避免请求过多
11640
+
11641
+ setTimeout(function () {
11642
+ console.info('尝试重连...');
11643
+ that.initWebSocket();
11644
+ that.lockReconnect = false;
11645
+ }, 5000);
11646
+ };
11647
+
11648
+ this.heartCheckFun = function () {
11649
+ var that = _this; //心跳检测,每20s心跳一次
11650
+
11651
+ that.heartCheck = {
11652
+ timeout: 20000,
11653
+ timeoutObj: null,
11654
+ serverTimeoutObj: null,
11655
+ reset: function reset() {
11656
+ clearTimeout(this.timeoutObj); //clearTimeout(this.serverTimeoutObj);
11657
+
11658
+ return this;
11659
+ },
11660
+ start: function start() {
11661
+ this.timeoutObj = setTimeout(function () {
11662
+ //这里发送一个心跳,后端收到后,返回一个心跳消息,
11663
+ //onmessage拿到返回的心跳就说明连接正常
11664
+ that.send(that.HeartBeat);
11665
+ console.info('客户端发送心跳'); //self.serverTimeoutObj = setTimeout(function(){//如果超过一定时间还没重置,说明后端主动断开了
11666
+ // that.websock.close();//如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
11667
+ //}, self.timeout)
11668
+ }, this.timeout);
11669
+ }
11670
+ };
11671
+ };
11672
+
11673
+ this.WebSocket = WebSocket || WebSocket;
11674
+ this.url = url;
11675
+ this.options = options !== null && options !== void 0 ? options : [];
11676
+
11677
+ this.onopenCB = onopen || function () {};
11678
+
11679
+ this.onerrorCB = onerror || function () {};
11680
+
11681
+ this.onmessageCB = onmessage || function () {};
11682
+
11683
+ this.oncloseCB = onclose || function () {};
11684
+
11685
+ this.HeartBeat = HeartBeat || 'HeartBeat';
11686
+ this.stopTimer = false;
11687
+ this.websock = null;
11688
+ this.lockReconnect = false;
11689
+ this.heartCheck = null;
11690
+ });
11691
+
11561
11692
  exports.AutoScroll = Index$9;
11562
11693
  exports.Breadcrumb = Index$b;
11563
11694
  exports.Button = WButton;
@@ -11582,3 +11713,4 @@ exports.Table = Table;
11582
11713
  exports.TreeSelect = Index$5;
11583
11714
  exports.WDatePicker = Index$6;
11584
11715
  exports.WForm = WForm$1;
11716
+ exports.WebsocketHeart = WebsocketHeart;
@@ -0,0 +1,24 @@
1
+ export default class WebsocketHeart {
2
+ WebSocket: any;
3
+ url: any;
4
+ options: any;
5
+ onopenCB: any;
6
+ onerrorCB: any;
7
+ onmessageCB: any;
8
+ oncloseCB: any;
9
+ HeartBeat: any;
10
+ stopTimer: any;
11
+ websock: any;
12
+ lockReconnect: any;
13
+ heartCheck: any;
14
+ constructor({ WebSocket, url, options, onopen, onerror, onmessage, onclose, HeartBeat, }: any);
15
+ init: () => void;
16
+ initWebSocket: () => void;
17
+ websocketOnopen: () => void;
18
+ websocketOnerror: (e: any) => void;
19
+ websocketOnmessage: (e: any) => void;
20
+ websocketOnclose: (e: string) => void;
21
+ send: (text: any) => void;
22
+ reconnect: () => void;
23
+ heartCheckFun: () => void;
24
+ }
package/package.json CHANGED
@@ -1,79 +1,79 @@
1
- {
2
- "private": false,
3
- "name": "wargerm",
4
- "version": "0.2.26",
5
- "scripts": {
6
- "dev": "dumi dev",
7
- "docs:build": "dumi build",
8
- "docs:deploy": "gh-pages -d docs-dist",
9
- "build": "father-build",
10
- "deploy": "npm run docs:build && npm run docs:deploy",
11
- "release": "npm run build && npm publish",
12
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
- "test": "umi-test",
14
- "test:coverage": "umi-test --coverage"
15
- },
16
- "main": "dist/index.js",
17
- "module": "dist/index.esm.js",
18
- "unpkg": "dist/index.umd.min.js",
19
- "typings": "dist/index.d.ts",
20
- "author": "jinly2",
21
- "license": "MIT",
22
- "keywords": [
23
- "React",
24
- "Component"
25
- ],
26
- "gitHooks": {
27
- "pre-commit": "lint-staged"
28
- },
29
- "repository": {
30
- "type": "git",
31
- "url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
32
- "branch": "main"
33
- },
34
- "files": [
35
- "dist",
36
- "es",
37
- "lib",
38
- "index.css"
39
- ],
40
- "lint-staged": {
41
- "*.{js,jsx,less,md,json}": [
42
- "prettier --write"
43
- ],
44
- "*.ts?(x)": [
45
- "prettier --parser=typescript --write"
46
- ]
47
- },
48
- "dependencies": {
49
- "@ant-design/pro-form": "^1.49.3",
50
- "@ant-design/pro-table": "^2.58.1",
51
- "animate.css": "^4.1.1",
52
- "react-countup": "^6.0.0",
53
- "react-dom": "^17.0.2",
54
- "swiper": "^6.7.0"
55
- },
56
- "peerDependencies": {
57
- "@ant-design/icons": ">=4.2.0",
58
- "antd": ">=4.7.0",
59
- "classnames": ">=2.2.0",
60
- "lodash": ">=4.0.0",
61
- "react": ">=17.0.0"
62
- },
63
- "devDependencies": {
64
- "@ant-design/icons": "^4.6.4",
65
- "@types/lodash": "^4.14.173",
66
- "@types/react-dom": "^17.0.11",
67
- "@umijs/test": "^3.0.5",
68
- "antd": "^4.16.13",
69
- "babel-plugin-import": "^1.13.3",
70
- "classnames": "^2.3.1",
71
- "dumi": "^1.1.31",
72
- "father-build": "^1.19.1",
73
- "gh-pages": "^3.0.0",
74
- "lint-staged": "^10.0.7",
75
- "prettier": "^1.19.1",
76
- "react": "^16.12.0",
77
- "yorkie": "^2.0.0"
78
- }
79
- }
1
+ {
2
+ "private": false,
3
+ "name": "wargerm",
4
+ "version": "0.2.30",
5
+ "scripts": {
6
+ "dev": "dumi dev",
7
+ "docs:build": "dumi build",
8
+ "docs:deploy": "gh-pages -d docs-dist",
9
+ "build": "father-build",
10
+ "deploy": "npm run docs:build && npm run docs:deploy",
11
+ "release": "npm run build && npm publish",
12
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
+ "test": "umi-test",
14
+ "test:coverage": "umi-test --coverage"
15
+ },
16
+ "main": "dist/index.js",
17
+ "module": "dist/index.esm.js",
18
+ "unpkg": "dist/index.umd.min.js",
19
+ "typings": "dist/index.d.ts",
20
+ "author": "jinly2",
21
+ "license": "MIT",
22
+ "keywords": [
23
+ "React",
24
+ "Component"
25
+ ],
26
+ "gitHooks": {
27
+ "pre-commit": "lint-staged"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "http://code.eblssmart.com/platform/web/wargerm-components.git",
32
+ "branch": "main"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "es",
37
+ "lib",
38
+ "index.css"
39
+ ],
40
+ "lint-staged": {
41
+ "*.{js,jsx,less,md,json}": [
42
+ "prettier --write"
43
+ ],
44
+ "*.ts?(x)": [
45
+ "prettier --parser=typescript --write"
46
+ ]
47
+ },
48
+ "dependencies": {
49
+ "@ant-design/pro-form": "^1.49.3",
50
+ "@ant-design/pro-table": "^2.58.1",
51
+ "animate.css": "^4.1.1",
52
+ "react-countup": "^6.0.0",
53
+ "react-dom": "^17.0.2",
54
+ "swiper": "^6.7.0"
55
+ },
56
+ "peerDependencies": {
57
+ "@ant-design/icons": ">=4.2.0",
58
+ "antd": ">=4.7.0",
59
+ "classnames": ">=2.2.0",
60
+ "lodash": ">=4.0.0",
61
+ "react": ">=17.0.0"
62
+ },
63
+ "devDependencies": {
64
+ "@ant-design/icons": "^4.6.4",
65
+ "@types/lodash": "^4.14.173",
66
+ "@types/react-dom": "^17.0.11",
67
+ "@umijs/test": "^3.0.5",
68
+ "antd": "^4.16.13",
69
+ "babel-plugin-import": "^1.13.3",
70
+ "classnames": "^2.3.1",
71
+ "dumi": "^1.1.31",
72
+ "father-build": "^1.19.1",
73
+ "gh-pages": "^3.0.0",
74
+ "lint-staged": "^10.0.7",
75
+ "prettier": "^1.19.1",
76
+ "react": "^16.12.0",
77
+ "yorkie": "^2.0.0"
78
+ }
79
+ }