easy3wui 1.5.60 → 1.5.62-beta1

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.
@@ -53,16 +53,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
53
53
  var Easy3wModal = function (_Component) {
54
54
  (0, _inherits3['default'])(Easy3wModal, _Component);
55
55
 
56
- function Easy3wModal() {
57
- var _temp, _this, _ret;
58
-
56
+ function Easy3wModal(props) {
59
57
  (0, _classCallCheck3['default'])(this, Easy3wModal);
60
58
 
61
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
62
- args[_key] = arguments[_key];
63
- }
59
+ var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
64
60
 
65
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.onClickFunc = function (e, func) {
61
+ _this.onClickFunc = function (e, func) {
66
62
  var globalLoading = _this.props.loadingFlag.global;
67
63
  if (globalLoading) {
68
64
  _notification3['default'].warning({
@@ -73,7 +69,9 @@ var Easy3wModal = function (_Component) {
73
69
  } else {
74
70
  func(e);
75
71
  }
76
- }, _this.getOneBtnObj = function (obj) {
72
+ };
73
+
74
+ _this.getOneBtnObj = function (obj) {
77
75
  return _react2['default'].createElement(
78
76
  _button2['default'],
79
77
  {
@@ -86,7 +84,9 @@ var Easy3wModal = function (_Component) {
86
84
  },
87
85
  obj.cName
88
86
  );
89
- }, _this.getBtnObj = function () {
87
+ };
88
+
89
+ _this.getBtnObj = function () {
90
90
  var footBtnArr = _this.props.footBtnArr;
91
91
 
92
92
  var allBtn = footBtnArr.map(function (btn) {
@@ -97,10 +97,22 @@ var Easy3wModal = function (_Component) {
97
97
  { style: { textAlign: 'center' } },
98
98
  allBtn
99
99
  );
100
- }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
100
+ };
101
+
102
+ _this.timer = null; // 初始化定时器变量
103
+ return _this;
101
104
  }
102
105
 
106
+ Easy3wModal.prototype.componentWillUnmount = function componentWillUnmount() {
107
+ // 组件卸载时清除定时器
108
+ if (this.timer) {
109
+ clearTimeout(this.timer);
110
+ }
111
+ };
112
+
103
113
  Easy3wModal.prototype.render = function render() {
114
+ var _this2 = this;
115
+
104
116
  var _props = this.props,
105
117
  title = _props.title,
106
118
  children = _props.children,
@@ -126,7 +138,10 @@ var Easy3wModal = function (_Component) {
126
138
  style: { top: 20 }
127
139
  }, this.props, {
128
140
  afterClose: function afterClose() {
129
- document.body.style.overflow = '';
141
+ _this2.timer = setTimeout(function () {
142
+ document.body.style.overflow = '';
143
+ _this2.timer = null; // 清除定时器引用
144
+ }, 1);
130
145
  }
131
146
  }),
132
147
  children
@@ -210,7 +210,7 @@ var Easy3wUpload = function (_Component) {
210
210
  authToken: authToken,
211
211
  ENCFlag: ENCFlag,
212
212
  sign: '2959f1aea8db0f7fbba61f0f8474d0ef',
213
- data: JSON.stringify(sendData),
213
+ data: JSON.stringify(sendData || {}),
214
214
  easy3wRootOrg: _comonConfig.easy3wRootOrg || ''
215
215
  }
216
216
  };
@@ -538,11 +538,12 @@ var _initialiseProps = function _initialiseProps() {
538
538
  urlDownloadFile = _props3.urlDownloadFile,
539
539
  uploadDoneCallback = _props3.uploadDoneCallback;
540
540
 
541
+ var sendDataNew = sendData || {};
541
542
  formData.append('sendTime', new Date().getTime());
542
543
  formData.append('appType', '01');
543
544
  formData.append('authToken', authToken);
544
545
  formData.append('devId', '');
545
- formData.append('data', JSON.stringify((0, _extends3['default'])({ uploadParams: uploadParams }, sendData)));
546
+ formData.append('data', JSON.stringify((0, _extends3['default'])({ uploadParams: uploadParams }, sendDataNew)));
546
547
  formData.append('sign', '2959f1aea8db0f7fbba61f0f8474d0ef');
547
548
  formData.append('easy3wRootOrg', _comonConfig.easy3wRootOrg || '');
548
549
 
@@ -684,6 +685,7 @@ var _initialiseProps = function _initialiseProps() {
684
685
  urlUpBigFileGeneral = _props4.urlUpBigFileGeneral,
685
686
  urlDownloadFile = _props4.urlDownloadFile;
686
687
 
688
+ var sendDataNew = sendData || {};
687
689
  var chunkSize = 0;
688
690
  if (typeof limitChunkSize === 'string') {
689
691
  if (limitChunkSize.toLowerCase().indexOf('k') !== -1) {
@@ -730,7 +732,7 @@ var _initialiseProps = function _initialiseProps() {
730
732
  var formData = new FormData();
731
733
  var authToken = Easy3wGetCookie('userToken') || '40572da23bee5fd59cc5b6c8d8bfb36d';
732
734
  var blob = new Blob([e.target.result], { type: 'application/octet-stream' });
733
- var postParam = (0, _extends3['default'])({ fileInfo: file }, sendData, { currentSize: end, startSize: start, chunkMD5: chunkMD5 });
735
+ var postParam = (0, _extends3['default'])({ fileInfo: file }, sendDataNew, { currentSize: end, startSize: start, chunkMD5: chunkMD5 });
734
736
  formData.append('chunk', blob);
735
737
  formData.append('sendTime', new Date().getTime());
736
738
  formData.append('appType', '01');
@@ -215,7 +215,7 @@ var Easy3wUploadM = function (_Component) {
215
215
  authToken: authToken,
216
216
  ENCFlag: ENCFlag,
217
217
  sign: '2959f1aea8db0f7fbba61f0f8474d0ef',
218
- data: JSON.stringify(sendData),
218
+ data: JSON.stringify(sendData || {}),
219
219
  easy3wRootOrg: _comonConfig.easy3wRootOrg || ''
220
220
  }
221
221
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.60",
3
+ "version": "1.5.62-beta1",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",