easy3wui 1.5.70-beta4 → 1.5.70-beta5
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/Easy3wCol/index.js +53 -0
- package/lib/Easy3wDownLoad/index.js +4 -4
- package/lib/Easy3wFormPage/index.js +18 -10
- package/lib/Easy3wGridInputEmail/index.js +73 -0
- package/lib/Easy3wGridPage/index.js +13 -6
- package/lib/Easy3wRow/index.js +53 -0
- package/lib/Easy3wTree/index.js +17 -16
- package/lib/Easy3wUIConfig/index.js +27 -0
- package/lib/Easy3wUpload/index.js +4 -2
- package/lib/Easy3wUploadB/index.js +4 -2
- package/lib/Easy3wUploadM/index.js +4 -2
- package/lib/index.js +9 -0
- package/package.json +1 -1
- package/lib/Easy3wTree/index.less +0 -6
- package/lib/Easy3wUpload copy/index.js +0 -511
- package/lib/Easy3wUploadB copy/index copy 2.js +0 -1011
- package/lib/Easy3wUploadB copy/index copy.js +0 -1020
- package/lib/Easy3wUploadB copy/index.js +0 -1056
- package/lib/Easy3wUploadM copy/index.js +0 -513
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
6
|
+
|
|
7
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
8
|
+
|
|
9
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
10
|
+
|
|
11
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
12
|
+
|
|
13
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
14
|
+
|
|
15
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
16
|
+
|
|
17
|
+
var _react = require('react');
|
|
18
|
+
|
|
19
|
+
var _react2 = _interopRequireDefault(_react);
|
|
20
|
+
|
|
21
|
+
var _col = require('antd/lib/col');
|
|
22
|
+
|
|
23
|
+
var _col2 = _interopRequireDefault(_col);
|
|
24
|
+
|
|
25
|
+
require('antd/lib/col/style');
|
|
26
|
+
|
|
27
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
28
|
+
|
|
29
|
+
var Easy3wCol = function (_Component) {
|
|
30
|
+
(0, _inherits3['default'])(Easy3wCol, _Component);
|
|
31
|
+
|
|
32
|
+
function Easy3wCol() {
|
|
33
|
+
(0, _classCallCheck3['default'])(this, Easy3wCol);
|
|
34
|
+
return (0, _possibleConstructorReturn3['default'])(this, _Component.apply(this, arguments));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Easy3wCol.prototype.render = function render() {
|
|
38
|
+
var _props = this.props,
|
|
39
|
+
objColProps = _props.objColProps,
|
|
40
|
+
children = _props.children;
|
|
41
|
+
|
|
42
|
+
return _react2['default'].createElement(
|
|
43
|
+
_col2['default'],
|
|
44
|
+
objColProps,
|
|
45
|
+
children
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return Easy3wCol;
|
|
50
|
+
}(_react.Component);
|
|
51
|
+
|
|
52
|
+
exports['default'] = Easy3wCol;
|
|
53
|
+
module.exports = exports['default'];
|
|
@@ -70,9 +70,9 @@ var _Easy3wAESEncrypt = require('../Easy3wAESEncrypt');
|
|
|
70
70
|
|
|
71
71
|
var _Easy3wAESEncrypt2 = _interopRequireDefault(_Easy3wAESEncrypt);
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
var _Easy3wUIConfig = require('../Easy3wUIConfig');
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
76
76
|
|
|
77
77
|
var Easy3wDownLoad = function (_Component) {
|
|
78
78
|
(0, _inherits3['default'])(Easy3wDownLoad, _Component);
|
|
@@ -83,7 +83,7 @@ var Easy3wDownLoad = function (_Component) {
|
|
|
83
83
|
var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
|
|
84
84
|
|
|
85
85
|
_this.onPreview = function (file, url) {
|
|
86
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
|
|
86
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
|
|
87
87
|
var previewFileUrl = objPreviewFileNew.previewFileUrl,
|
|
88
88
|
previewFileType = objPreviewFileNew.previewFileType;
|
|
89
89
|
var uid = file.uid,
|
|
@@ -198,7 +198,7 @@ var Easy3wDownLoad = function (_Component) {
|
|
|
198
198
|
fileViewURL = _props.fileViewURL,
|
|
199
199
|
fileCallURL = _props.fileCallURL;
|
|
200
200
|
|
|
201
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
201
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
202
202
|
var previewFileFlag = objPreviewFileNew.previewFileFlag,
|
|
203
203
|
downloadFileFlag = objPreviewFileNew.downloadFileFlag,
|
|
204
204
|
previewFileType = objPreviewFileNew.previewFileType;
|
|
@@ -404,10 +404,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
404
404
|
// return this.inputNumberFormatHandler(itemNew);
|
|
405
405
|
case 'numberInput':
|
|
406
406
|
return _this.numberInputHandler(itemNew);
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
// case 'inputDigit':
|
|
410
|
-
// return this.inputDigitHandler(itemNew);
|
|
407
|
+
case 'email':
|
|
408
|
+
return _this.inputEmailHandler(itemNew);
|
|
411
409
|
case 'mention':
|
|
412
410
|
return _this.mentionHandler(itemNew);
|
|
413
411
|
case 'rate':
|
|
@@ -706,6 +704,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
706
704
|
} else if (fieldType === 'mobile') {
|
|
707
705
|
var e3wMobileNation = form.getFieldValue(fieldId + 'AddonBefore');
|
|
708
706
|
addRules = [{ pattern: _comonConfig.objMobileRegular ? _comonConfig.objMobileRegular[e3wMobileNation] : objMobileRegularDefault[e3wMobileNation], message: '手机格式错误!' }].concat(addRules);
|
|
707
|
+
} else if (fieldType === 'email') {
|
|
708
|
+
addRules = [{ type: 'email', message: '邮箱地址格式错误!' }].concat(addRules);
|
|
709
709
|
}
|
|
710
710
|
var decoratorObj = {
|
|
711
711
|
rules: [{ required: isDisableRuleFlag, message: requiredMessage || '\u8BF7' + strRMsg + label }].concat(addRules)
|
|
@@ -1345,12 +1345,17 @@ var Easy3wFormPage = function (_Component) {
|
|
|
1345
1345
|
var _item$cmptPros = item.cmptPros,
|
|
1346
1346
|
cmptPros = _item$cmptPros === undefined ? {} : _item$cmptPros;
|
|
1347
1347
|
|
|
1348
|
+
return _react2['default'].createElement(_input2['default'], cmptPros);
|
|
1349
|
+
}, _this.inputEmailHandler = function (item) {
|
|
1350
|
+
var _item$cmptPros2 = item.cmptPros,
|
|
1351
|
+
cmptPros = _item$cmptPros2 === undefined ? {} : _item$cmptPros2;
|
|
1352
|
+
|
|
1348
1353
|
return _react2['default'].createElement(_input2['default'], cmptPros);
|
|
1349
1354
|
}, _this.mobileHandler = function (item) {
|
|
1350
1355
|
var fieldId = item.fieldId,
|
|
1351
1356
|
required = item.required,
|
|
1352
|
-
_item$
|
|
1353
|
-
cmptPros = _item$
|
|
1357
|
+
_item$cmptPros3 = item.cmptPros,
|
|
1358
|
+
cmptPros = _item$cmptPros3 === undefined ? {} : _item$cmptPros3;
|
|
1354
1359
|
|
|
1355
1360
|
var addonBeforeCmptPros = item.addonBeforeCmptPros || {};
|
|
1356
1361
|
addonBeforeCmptPros = (0, _extends3['default'])({ allowClear: false, style: { minWidth: '90px' } }, addonBeforeCmptPros);
|
|
@@ -1545,8 +1550,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
1545
1550
|
_message3['default'].info('\u8F93\u5165\u5B57\u6570\u4E0D\u80FD\u8D85\u8FC7' + maxLength);
|
|
1546
1551
|
}
|
|
1547
1552
|
}, _this.textareaHandler = function (item) {
|
|
1548
|
-
var _item$
|
|
1549
|
-
cmptPros = _item$
|
|
1553
|
+
var _item$cmptPros4 = item.cmptPros,
|
|
1554
|
+
cmptPros = _item$cmptPros4 === undefined ? {} : _item$cmptPros4;
|
|
1550
1555
|
|
|
1551
1556
|
var maxlength = void 0;
|
|
1552
1557
|
if (cmptPros.maxLength || cmptPros.maxlength) {
|
|
@@ -2090,6 +2095,9 @@ var Easy3wFormPage = function (_Component) {
|
|
|
2090
2095
|
/** upload end */
|
|
2091
2096
|
/** input start */
|
|
2092
2097
|
|
|
2098
|
+
/** input end */
|
|
2099
|
+
// #region inputEmail
|
|
2100
|
+
|
|
2093
2101
|
/** input end */
|
|
2094
2102
|
/** mobile start */
|
|
2095
2103
|
|
|
@@ -3580,8 +3588,8 @@ var Easy3wFormPageTight = function (_Component2) {
|
|
|
3580
3588
|
form = _this2$props7.form,
|
|
3581
3589
|
allReadFlag = _this2$props7.allReadFlag;
|
|
3582
3590
|
var getFieldDecorator = form.getFieldDecorator;
|
|
3583
|
-
var _item$
|
|
3584
|
-
cmptPros = _item$
|
|
3591
|
+
var _item$cmptPros5 = item.cmptPros,
|
|
3592
|
+
cmptPros = _item$cmptPros5 === undefined ? {} : _item$cmptPros5,
|
|
3585
3593
|
label = item.label,
|
|
3586
3594
|
fieldId = item.fieldId,
|
|
3587
3595
|
required = item.required,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
6
|
+
|
|
7
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
8
|
+
|
|
9
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
10
|
+
|
|
11
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
12
|
+
|
|
13
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
14
|
+
|
|
15
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
16
|
+
|
|
17
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
18
|
+
|
|
19
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
20
|
+
|
|
21
|
+
var _react = require('react');
|
|
22
|
+
|
|
23
|
+
var _react2 = _interopRequireDefault(_react);
|
|
24
|
+
|
|
25
|
+
var _form = require('antd/lib/form');
|
|
26
|
+
|
|
27
|
+
var _form2 = _interopRequireDefault(_form);
|
|
28
|
+
|
|
29
|
+
require('antd/lib/form/style');
|
|
30
|
+
|
|
31
|
+
var _input = require('antd/lib/input');
|
|
32
|
+
|
|
33
|
+
var _input2 = _interopRequireDefault(_input);
|
|
34
|
+
|
|
35
|
+
require('antd/lib/input/style');
|
|
36
|
+
|
|
37
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
38
|
+
|
|
39
|
+
var Easy3wGridInputEmail = function (_Component) {
|
|
40
|
+
(0, _inherits3['default'])(Easy3wGridInputEmail, _Component);
|
|
41
|
+
|
|
42
|
+
function Easy3wGridInputEmail() {
|
|
43
|
+
(0, _classCallCheck3['default'])(this, Easy3wGridInputEmail);
|
|
44
|
+
return (0, _possibleConstructorReturn3['default'])(this, _Component.apply(this, arguments));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
Easy3wGridInputEmail.prototype.render = function render() {
|
|
48
|
+
var _props = this.props,
|
|
49
|
+
fieldId = _props.fieldId,
|
|
50
|
+
value = _props.value,
|
|
51
|
+
form = _props.form,
|
|
52
|
+
cmptPros = _props.cmptPros,
|
|
53
|
+
required = _props.required,
|
|
54
|
+
requiredMessage = _props.requiredMessage,
|
|
55
|
+
label = _props.label;
|
|
56
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
57
|
+
|
|
58
|
+
var rules = [{ required: required, message: requiredMessage || '\u8BF7\u586B\u5199' + label }, { pattern: 'email', message: '邮箱地址格式错误!' }];
|
|
59
|
+
return _react2['default'].createElement(
|
|
60
|
+
_form2['default'].Item,
|
|
61
|
+
{ style: { marginBottom: 0 } },
|
|
62
|
+
getFieldDecorator(fieldId, {
|
|
63
|
+
rules: rules,
|
|
64
|
+
initialValue: value
|
|
65
|
+
})(_react2['default'].createElement(_input2['default'], (0, _extends3['default'])({}, cmptPros, { style: { minWidth: 80 } })))
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return Easy3wGridInputEmail;
|
|
70
|
+
}(_react.Component);
|
|
71
|
+
|
|
72
|
+
exports['default'] = Easy3wGridInputEmail;
|
|
73
|
+
module.exports = exports['default'];
|
|
@@ -129,7 +129,8 @@ var Easy3wGridPage = function (_Component) {
|
|
|
129
129
|
chooseFlag = _props.chooseFlag,
|
|
130
130
|
scroll = _props.scroll,
|
|
131
131
|
className = _props.className,
|
|
132
|
-
paginationInfo = _props.paginationInfo
|
|
132
|
+
paginationInfo = _props.paginationInfo,
|
|
133
|
+
handleSearchNew = _props.handleSearchNew;
|
|
133
134
|
var _state = this.state,
|
|
134
135
|
selectedRowKeysState = _state.selectedRowKeysState,
|
|
135
136
|
selectedRowsState = _state.selectedRowsState,
|
|
@@ -231,7 +232,7 @@ var Easy3wGridPage = function (_Component) {
|
|
|
231
232
|
}
|
|
232
233
|
var myColumns = columns;
|
|
233
234
|
// 处理分页 start
|
|
234
|
-
if (needPaginationFlag) {
|
|
235
|
+
if (needPaginationFlag || handleSearchNew) {
|
|
235
236
|
var defaultCurrent = paginationInfo ? paginationInfo.offset : 1;
|
|
236
237
|
var defaultPageSize = paginationInfo ? paginationInfo.limit : 10;
|
|
237
238
|
var current = paginationInfo ? paginationInfo.offset : this.state.pagination.offset;
|
|
@@ -624,15 +625,21 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
624
625
|
var _props7 = _this3.props,
|
|
625
626
|
selfDealPageChangeFunc = _props7.selfDealPageChangeFunc,
|
|
626
627
|
getSearchCondition = _props7.getSearchCondition,
|
|
627
|
-
handleSearch = _props7.handleSearch
|
|
628
|
+
handleSearch = _props7.handleSearch,
|
|
629
|
+
handleSearchNew = _props7.handleSearchNew;
|
|
628
630
|
|
|
629
|
-
var formVal =
|
|
631
|
+
var formVal = {};
|
|
632
|
+
if (getSearchCondition && typeof getSearchCondition === 'function') {
|
|
633
|
+
formVal = getSearchCondition();
|
|
634
|
+
}
|
|
630
635
|
var paginationInfo = { offset: pagination.current, limit: pagination.pageSize };
|
|
631
636
|
_this3.setState({ pagination: paginationInfo });
|
|
632
|
-
if (selfDealPageChangeFunc) {
|
|
637
|
+
if (selfDealPageChangeFunc && typeof selfDealPageChangeFunc === 'function') {
|
|
633
638
|
selfDealPageChangeFunc(paginationInfo, formVal);
|
|
634
|
-
} else {
|
|
639
|
+
} else if (handleSearch && typeof handleSearch === 'function') {
|
|
635
640
|
handleSearch(paginationInfo, formVal);
|
|
641
|
+
} else if (handleSearchNew && typeof handleSearchNew === 'function') {
|
|
642
|
+
handleSearchNew(paginationInfo, formVal);
|
|
636
643
|
}
|
|
637
644
|
};
|
|
638
645
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
6
|
+
|
|
7
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
8
|
+
|
|
9
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
10
|
+
|
|
11
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
12
|
+
|
|
13
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
14
|
+
|
|
15
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
16
|
+
|
|
17
|
+
var _react = require('react');
|
|
18
|
+
|
|
19
|
+
var _react2 = _interopRequireDefault(_react);
|
|
20
|
+
|
|
21
|
+
var _row = require('antd/lib/row');
|
|
22
|
+
|
|
23
|
+
var _row2 = _interopRequireDefault(_row);
|
|
24
|
+
|
|
25
|
+
require('antd/lib/row/style');
|
|
26
|
+
|
|
27
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
28
|
+
|
|
29
|
+
var Easy3wRow = function (_Component) {
|
|
30
|
+
(0, _inherits3['default'])(Easy3wRow, _Component);
|
|
31
|
+
|
|
32
|
+
function Easy3wRow() {
|
|
33
|
+
(0, _classCallCheck3['default'])(this, Easy3wRow);
|
|
34
|
+
return (0, _possibleConstructorReturn3['default'])(this, _Component.apply(this, arguments));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
Easy3wRow.prototype.render = function render() {
|
|
38
|
+
var _props = this.props,
|
|
39
|
+
objRowProps = _props.objRowProps,
|
|
40
|
+
children = _props.children;
|
|
41
|
+
|
|
42
|
+
return _react2['default'].createElement(
|
|
43
|
+
_row2['default'],
|
|
44
|
+
objRowProps,
|
|
45
|
+
children
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return Easy3wRow;
|
|
50
|
+
}(_react.Component);
|
|
51
|
+
|
|
52
|
+
exports['default'] = Easy3wRow;
|
|
53
|
+
module.exports = exports['default'];
|
package/lib/Easy3wTree/index.js
CHANGED
|
@@ -77,6 +77,7 @@ var Easy3wTree = function (_Component) {
|
|
|
77
77
|
bidPureComponent(_this);
|
|
78
78
|
}
|
|
79
79
|
var arrDefaultExpandedKeys = _this.touchGetDEK(arrData);
|
|
80
|
+
_this.searchRef = _react2['default'].createRef();
|
|
80
81
|
_this.state = {
|
|
81
82
|
// 两数量值,用于彻底更新树,树数据更新,重新渲染,使defaultExpandedKeys生效
|
|
82
83
|
treevisible: true, // 显示树
|
|
@@ -87,8 +88,6 @@ var Easy3wTree = function (_Component) {
|
|
|
87
88
|
};
|
|
88
89
|
return _this;
|
|
89
90
|
}
|
|
90
|
-
// eslint-disable-next-line react/sort-comp
|
|
91
|
-
|
|
92
91
|
// 获取默认展开节点
|
|
93
92
|
|
|
94
93
|
// 更新state
|
|
@@ -131,7 +130,7 @@ var Easy3wTree = function (_Component) {
|
|
|
131
130
|
searchFlag ? _react2['default'].createElement(Search, {
|
|
132
131
|
placeholder: '\u8BF7\u8F93\u5165\u67E5\u8BE2\u5185\u5BB9',
|
|
133
132
|
onChange: function onChange(e) {
|
|
134
|
-
return _this2.
|
|
133
|
+
return _this2.touchSearch(e.target.value);
|
|
135
134
|
}
|
|
136
135
|
// style={{ width: 'calc(100% - 12px)', margin: '0 6px' }}
|
|
137
136
|
, ref: this.searchRef,
|
|
@@ -142,12 +141,12 @@ var Easy3wTree = function (_Component) {
|
|
|
142
141
|
(0, _extends3['default'])({
|
|
143
142
|
defaultExpandedKeys: arrSearchExpandedKeys && arrSearchExpandedKeys.length > 0 ? arrSearchExpandedKeys : arrDefaultExpandedKeys // 树默认展开节点key Array
|
|
144
143
|
, selectedKeys: selectedKeys // 选中节点key Array
|
|
145
|
-
, showLine: true
|
|
146
|
-
|
|
144
|
+
, showLine: true,
|
|
145
|
+
showIcon: true
|
|
147
146
|
// multiple 多选
|
|
148
|
-
, onSelect: this.
|
|
147
|
+
, onSelect: this.touchSelect
|
|
149
148
|
}, objTreeProps),
|
|
150
|
-
this.
|
|
149
|
+
this.touchRenderTreeNodes(arrDataVisible)
|
|
151
150
|
) : ''
|
|
152
151
|
);
|
|
153
152
|
};
|
|
@@ -158,8 +157,6 @@ var Easy3wTree = function (_Component) {
|
|
|
158
157
|
var _initialiseProps = function _initialiseProps() {
|
|
159
158
|
var _this3 = this;
|
|
160
159
|
|
|
161
|
-
this.searchRef = _react2['default'].createRef();
|
|
162
|
-
|
|
163
160
|
this.componentDidUpdate = function (prevProps) {
|
|
164
161
|
var _props2 = _this3.props,
|
|
165
162
|
intUpdateCount = _props2.intUpdateCount,
|
|
@@ -203,7 +200,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
203
200
|
// 或者使用 antd 的方法
|
|
204
201
|
// this.searchRef.current.input.input.value = '';
|
|
205
202
|
_this3.searchRef.current.input.state.value = '';
|
|
206
|
-
_this3.
|
|
203
|
+
_this3.touchSearch('');
|
|
207
204
|
}
|
|
208
205
|
};
|
|
209
206
|
|
|
@@ -216,10 +213,11 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
216
213
|
return '';
|
|
217
214
|
};
|
|
218
215
|
|
|
219
|
-
this.
|
|
216
|
+
this.touchSearch = function (value) {
|
|
220
217
|
var _props3 = _this3.props,
|
|
221
218
|
arrData = _props3.arrData,
|
|
222
|
-
|
|
219
|
+
objSearchProps = _props3.objSearchProps;
|
|
220
|
+
var onSearchCallback = objSearchProps.onSearchCallback;
|
|
223
221
|
|
|
224
222
|
var arrSearchExpandedKeys = [];
|
|
225
223
|
var arrDataVisible = [];
|
|
@@ -267,7 +265,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
267
265
|
return filteredData;
|
|
268
266
|
};
|
|
269
267
|
|
|
270
|
-
this.
|
|
268
|
+
this.touchSelect = function (selectedKeys, info) {
|
|
271
269
|
var _props$objTreeProps4 = _this3.props.objTreeProps,
|
|
272
270
|
objTreeProps = _props$objTreeProps4 === undefined ? {} : _props$objTreeProps4;
|
|
273
271
|
var onSelectCallback = objTreeProps.onSelectCallback;
|
|
@@ -280,7 +278,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
280
278
|
});
|
|
281
279
|
};
|
|
282
280
|
|
|
283
|
-
this.
|
|
281
|
+
this.touchRenderTreeNodes = function (arrDataVisible) {
|
|
284
282
|
var _props$objTreeProps5 = _this3.props.objTreeProps,
|
|
285
283
|
objTreeProps = _props$objTreeProps5 === undefined ? {} : _props$objTreeProps5;
|
|
286
284
|
var touchRenderNode = objTreeProps.touchRenderNode,
|
|
@@ -306,8 +304,11 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
306
304
|
(0, _extends3['default'])({
|
|
307
305
|
title: count ? title + '(' + count + ')' : title,
|
|
308
306
|
key: key
|
|
309
|
-
}, objItemNew
|
|
310
|
-
|
|
307
|
+
}, objItemNew, {
|
|
308
|
+
objNode: item // 节点信息-原
|
|
309
|
+
, objNodeNew: objItemNew // 节点信息-新-处理后的数据
|
|
310
|
+
}),
|
|
311
|
+
children ? _this3.touchRenderTreeNodes(children) : null
|
|
311
312
|
);
|
|
312
313
|
});
|
|
313
314
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var objPreviewFileDefault = exports.objPreviewFileDefault = {
|
|
5
|
+
previewFileFlag: true, // 是否文件预览标志 true:是 false:否
|
|
6
|
+
// previewFileUrl: 'easy3w4fExample/download?view=true&fileId=',
|
|
7
|
+
previewFileUrl: '#/blank/EQ/route/Easy3wTranfer?fileId=', // 文件预览地址 downloadFileFlag: '1', // 显示下载按钮 '1':显示 '0':隐藏
|
|
8
|
+
previewFileType: 'pdf,doc,docx' // 可预览文件格式(以逗号隔开)
|
|
9
|
+
};
|
|
10
|
+
var objReg = exports.objReg = {
|
|
11
|
+
numberRegex: /^-?(0|[1-9]\d*)(\.\d+)?([eE][-+]?\d+)?$|^Infinity$|^NaN$/i, // 匹配广义数字,包括整数、浮点数、科学计数法, 以及特殊值Infinity和NaN
|
|
12
|
+
// const testCases = [
|
|
13
|
+
// '0', // ✅ 合法
|
|
14
|
+
// '123', // ✅ 合法
|
|
15
|
+
// '-123', // ✅ 合法
|
|
16
|
+
// '0.123', // ✅ 合法
|
|
17
|
+
// '-0.123', // ✅ 合法
|
|
18
|
+
// '1e3', // ✅ 合法
|
|
19
|
+
// '-2.5e-4', // ✅ 合法
|
|
20
|
+
// '0324', // ❌ 非法(前导零)
|
|
21
|
+
// '00.123', // ❌ 非法(前导零)
|
|
22
|
+
// 'Infinity', // ✅ 合法
|
|
23
|
+
// 'NaN', // ✅ 合法
|
|
24
|
+
// 'abc', // ❌ 非法
|
|
25
|
+
// ];
|
|
26
|
+
strictNumberRegex: /^-?(0|[1-9][0-9]*)(\.[0-9]*)?$/ // 匹配严格数字, 整数、浮点数、负数, 但不包括科学计数法
|
|
27
|
+
};
|
|
@@ -76,6 +76,8 @@ var _Easy3wAESEncrypt = require('../Easy3wAESEncrypt');
|
|
|
76
76
|
|
|
77
77
|
var _Easy3wAESEncrypt2 = _interopRequireDefault(_Easy3wAESEncrypt);
|
|
78
78
|
|
|
79
|
+
var _Easy3wUIConfig = require('../Easy3wUIConfig');
|
|
80
|
+
|
|
79
81
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
80
82
|
|
|
81
83
|
// 文件上传配置
|
|
@@ -109,7 +111,7 @@ var Easy3wUpload = function (_Component) {
|
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.onPreview = function (file) {
|
|
112
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
|
|
114
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
|
|
113
115
|
var previewFileUrl = objPreviewFileNew.previewFileUrl,
|
|
114
116
|
previewFileType = objPreviewFileNew.previewFileType;
|
|
115
117
|
var uid = file.uid,
|
|
@@ -224,7 +226,7 @@ var Easy3wUpload = function (_Component) {
|
|
|
224
226
|
if (isRead) {
|
|
225
227
|
upProps = (0, _extends3['default'])({}, upProps, { children: true, showUploadList: { showDownloadIcon: true, showPreviewIcon: true, showRemoveIcon: false } });
|
|
226
228
|
}
|
|
227
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
229
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
228
230
|
var previewFileFlag = objPreviewFileNew.previewFileFlag;
|
|
229
231
|
|
|
230
232
|
if (previewFileFlag && fileViewFlag !== false) {
|
|
@@ -86,6 +86,8 @@ var _Easy3wAESEncrypt = require('../Easy3wAESEncrypt');
|
|
|
86
86
|
|
|
87
87
|
var _Easy3wAESEncrypt2 = _interopRequireDefault(_Easy3wAESEncrypt);
|
|
88
88
|
|
|
89
|
+
var _Easy3wUIConfig = require('../Easy3wUIConfig');
|
|
90
|
+
|
|
89
91
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
90
92
|
|
|
91
93
|
// 文件上传配置
|
|
@@ -343,7 +345,7 @@ var BigFileUpload = function (_Component) {
|
|
|
343
345
|
},
|
|
344
346
|
fileList: this.state.fileList
|
|
345
347
|
};
|
|
346
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
348
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
347
349
|
var previewFileFlag = objPreviewFileNew.previewFileFlag;
|
|
348
350
|
|
|
349
351
|
if (previewFileFlag && fileViewFlag !== false) {
|
|
@@ -503,7 +505,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
503
505
|
var _this3 = this;
|
|
504
506
|
|
|
505
507
|
this.onPreview = function (file) {
|
|
506
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, _this3.props.objPreviewFile);
|
|
508
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, _this3.props.objPreviewFile);
|
|
507
509
|
var previewFileUrl = objPreviewFileNew.previewFileUrl,
|
|
508
510
|
previewFileType = objPreviewFileNew.previewFileType;
|
|
509
511
|
var uid = file.uid,
|
|
@@ -76,6 +76,8 @@ var _Easy3wAESEncrypt = require('../Easy3wAESEncrypt');
|
|
|
76
76
|
|
|
77
77
|
var _Easy3wAESEncrypt2 = _interopRequireDefault(_Easy3wAESEncrypt);
|
|
78
78
|
|
|
79
|
+
var _Easy3wUIConfig = require('../Easy3wUIConfig');
|
|
80
|
+
|
|
79
81
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
80
82
|
|
|
81
83
|
// const { previewFileUrl, previewFileFlag, previewFileType } = objPreviewFile || {};
|
|
@@ -112,7 +114,7 @@ var Easy3wUploadM = function (_Component) {
|
|
|
112
114
|
fileList: [{}]
|
|
113
115
|
// 预览
|
|
114
116
|
}, _this.onPreview = function (file) {
|
|
115
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
|
|
117
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
|
|
116
118
|
var previewFileUrl = objPreviewFileNew.previewFileUrl,
|
|
117
119
|
previewFileType = objPreviewFileNew.previewFileType;
|
|
118
120
|
var uid = file.uid,
|
|
@@ -229,7 +231,7 @@ var Easy3wUploadM = function (_Component) {
|
|
|
229
231
|
if (isRead) {
|
|
230
232
|
upProps = (0, _extends3['default'])({}, upProps, { children: true, showUploadList: { showPreviewIcon: false, showRemoveIcon: false } });
|
|
231
233
|
}
|
|
232
|
-
var objPreviewFileNew = (0, _extends3['default'])({}, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
234
|
+
var objPreviewFileNew = (0, _extends3['default'])({}, _Easy3wUIConfig.objPreviewFileDefault, _comonConfig.objPreviewFile, this.props.objPreviewFile);
|
|
233
235
|
var previewFileFlag = objPreviewFileNew.previewFileFlag;
|
|
234
236
|
|
|
235
237
|
if (previewFileFlag && fileViewFlag !== false) {
|
package/lib/index.js
CHANGED
|
@@ -407,4 +407,13 @@ Object.defineProperty(exports, 'Easy3wTree', {
|
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
|
|
410
|
+
var _Easy3wUIConfig = require('./Easy3wUIConfig');
|
|
411
|
+
|
|
412
|
+
Object.defineProperty(exports, 'Easy3wUIConfig', {
|
|
413
|
+
enumerable: true,
|
|
414
|
+
get: function get() {
|
|
415
|
+
return _interopRequireDefault(_Easy3wUIConfig)['default'];
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
|
|
410
419
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
package/package.json
CHANGED