easy3wui 1.5.62-beta1 → 1.5.62
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/lib/Easy3wModal/index.js +11 -26
- package/lib/Easy3wUploadB/index.js +13 -0
- package/package.json +1 -1
package/lib/Easy3wModal/index.js
CHANGED
|
@@ -53,12 +53,16 @@ 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(
|
|
56
|
+
function Easy3wModal() {
|
|
57
|
+
var _temp, _this, _ret;
|
|
58
|
+
|
|
57
59
|
(0, _classCallCheck3['default'])(this, Easy3wModal);
|
|
58
60
|
|
|
59
|
-
var
|
|
61
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
62
|
+
args[_key] = arguments[_key];
|
|
63
|
+
}
|
|
60
64
|
|
|
61
|
-
_this.onClickFunc = function (e, func) {
|
|
65
|
+
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.onClickFunc = function (e, func) {
|
|
62
66
|
var globalLoading = _this.props.loadingFlag.global;
|
|
63
67
|
if (globalLoading) {
|
|
64
68
|
_notification3['default'].warning({
|
|
@@ -69,9 +73,7 @@ var Easy3wModal = function (_Component) {
|
|
|
69
73
|
} else {
|
|
70
74
|
func(e);
|
|
71
75
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
_this.getOneBtnObj = function (obj) {
|
|
76
|
+
}, _this.getOneBtnObj = function (obj) {
|
|
75
77
|
return _react2['default'].createElement(
|
|
76
78
|
_button2['default'],
|
|
77
79
|
{
|
|
@@ -84,9 +86,7 @@ var Easy3wModal = function (_Component) {
|
|
|
84
86
|
},
|
|
85
87
|
obj.cName
|
|
86
88
|
);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
_this.getBtnObj = function () {
|
|
89
|
+
}, _this.getBtnObj = function () {
|
|
90
90
|
var footBtnArr = _this.props.footBtnArr;
|
|
91
91
|
|
|
92
92
|
var allBtn = footBtnArr.map(function (btn) {
|
|
@@ -97,22 +97,10 @@ var Easy3wModal = function (_Component) {
|
|
|
97
97
|
{ style: { textAlign: 'center' } },
|
|
98
98
|
allBtn
|
|
99
99
|
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
_this.timer = null; // 初始化定时器变量
|
|
103
|
-
return _this;
|
|
100
|
+
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
|
|
104
101
|
}
|
|
105
102
|
|
|
106
|
-
Easy3wModal.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
107
|
-
// 组件卸载时清除定时器
|
|
108
|
-
if (this.timer) {
|
|
109
|
-
clearTimeout(this.timer);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
|
|
113
103
|
Easy3wModal.prototype.render = function render() {
|
|
114
|
-
var _this2 = this;
|
|
115
|
-
|
|
116
104
|
var _props = this.props,
|
|
117
105
|
title = _props.title,
|
|
118
106
|
children = _props.children,
|
|
@@ -138,10 +126,7 @@ var Easy3wModal = function (_Component) {
|
|
|
138
126
|
style: { top: 20 }
|
|
139
127
|
}, this.props, {
|
|
140
128
|
afterClose: function afterClose() {
|
|
141
|
-
|
|
142
|
-
document.body.style.overflow = '';
|
|
143
|
-
_this2.timer = null; // 清除定时器引用
|
|
144
|
-
}, 1);
|
|
129
|
+
document.body.style.overflow = '';
|
|
145
130
|
}
|
|
146
131
|
}),
|
|
147
132
|
children
|
|
@@ -181,6 +181,7 @@ var BigFileUpload = function (_Component) {
|
|
|
181
181
|
showUploadList = _props.showUploadList,
|
|
182
182
|
urlDownloadFile = _props.urlDownloadFile,
|
|
183
183
|
initialValue = _props.initialValue,
|
|
184
|
+
removeCallback = _props.removeCallback,
|
|
184
185
|
propsAFlag = _props.propsAFlag,
|
|
185
186
|
fileViewFlag = _props.fileViewFlag;
|
|
186
187
|
var maxFileSize = this.props.maxFileSize;
|
|
@@ -219,6 +220,9 @@ var BigFileUpload = function (_Component) {
|
|
|
219
220
|
iniSetedFlag: iniSetedFlag
|
|
220
221
|
}), function () {
|
|
221
222
|
_this2.setUploadValue(fileList);
|
|
223
|
+
if (removeCallback) {
|
|
224
|
+
removeCallback(name, file);
|
|
225
|
+
}
|
|
222
226
|
});
|
|
223
227
|
return;
|
|
224
228
|
}
|
|
@@ -232,6 +236,9 @@ var BigFileUpload = function (_Component) {
|
|
|
232
236
|
iniSetedFlag: iniSetedFlag
|
|
233
237
|
}), function () {
|
|
234
238
|
_this2.setUploadValue(fileList);
|
|
239
|
+
if (removeCallback) {
|
|
240
|
+
removeCallback(name, file);
|
|
241
|
+
}
|
|
235
242
|
});
|
|
236
243
|
} else {
|
|
237
244
|
_this2.setState((0, _extends3['default'])({}, _this2.state, {
|
|
@@ -241,6 +248,9 @@ var BigFileUpload = function (_Component) {
|
|
|
241
248
|
iniSetedFlag: iniSetedFlag
|
|
242
249
|
}), function () {
|
|
243
250
|
_this2.setUploadValue(fileList);
|
|
251
|
+
if (removeCallback) {
|
|
252
|
+
removeCallback(name, file);
|
|
253
|
+
}
|
|
244
254
|
});
|
|
245
255
|
}
|
|
246
256
|
} else {
|
|
@@ -251,6 +261,9 @@ var BigFileUpload = function (_Component) {
|
|
|
251
261
|
iniSetedFlag: iniSetedFlag
|
|
252
262
|
}), function () {
|
|
253
263
|
_this2.setUploadValue(fileList);
|
|
264
|
+
if (removeCallback) {
|
|
265
|
+
removeCallback(name, file);
|
|
266
|
+
}
|
|
254
267
|
});
|
|
255
268
|
}
|
|
256
269
|
return true;
|