easy3wui 1.5.70-beta11 → 1.5.70-beta13
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/assets/btn.css +24 -0
- package/assets/captcha.css +5 -0
- package/assets/card.css +34 -0
- package/assets/editBigTable.css +17 -0
- package/assets/exception.css +76 -0
- package/assets/flow.css +1871 -0
- package/assets/formPage.css +142 -0
- package/assets/globalFooter.css +26 -0
- package/assets/globalHeader.css +69 -0
- package/assets/gridPage.css +92 -0
- package/assets/index.css +2615 -0
- package/assets/login.css +61 -0
- package/assets/loginLayout.css +115 -0
- package/assets/modal.css +0 -0
- package/assets/result.css +45 -0
- package/assets/tree.css +4 -0
- package/assets/userLayout.css +70 -0
- package/lib/Easy3wEditBigTable/Editors/EditorNumber.js +92 -0
- package/lib/Easy3wEditBigTable/Editors/EditorsDatePicker.js +168 -0
- package/lib/Easy3wEditBigTable/Editors/EditorsInputNumber.js +141 -0
- package/lib/Easy3wGetCookie/index.js +14 -0
- package/lib/Easy3wGetDesensitization/index.js +43 -0
- package/lib/Easy3wGlobalFooter/index.js +73 -0
- package/lib/Easy3wGlobalHeader/index.js +148 -0
- package/lib/Easy3wGridCheckBox/index.js +69 -0
- package/lib/Easy3wGridDatePicker/index.js +90 -0
- package/lib/Easy3wGridDateTimePicker/index.js +122 -0
- package/lib/Easy3wGridInput/index.js +105 -0
- package/lib/Easy3wGridInputAmount/index.js +93 -0
- package/lib/Easy3wGridInputDigit/index.js +83 -0
- package/lib/Easy3wGridInputEmail/index.js +73 -0
- package/lib/Easy3wGridInputNumber/index.js +83 -0
- package/lib/Easy3wGridInputNumberFormat/index.js +93 -0
- package/lib/Easy3wGridPage/index.js +670 -0
- package/lib/Easy3wGridRadio/index.js +70 -0
- package/lib/Easy3wGridSelect/index.js +95 -0
- package/lib/Easy3wGridTextArea/index.js +128 -0
- package/lib/Easy3wInput/index.js +48 -0
- package/lib/Easy3wLogin/index.js +386 -0
- package/lib/Easy3wLoginLayout/index.js +628 -0
- package/lib/Easy3wModal/index.js +270 -0
- package/lib/Easy3wPositionButton/index.js +99 -0
- package/lib/Easy3wQryGrid/index.js +670 -0
- package/lib/Easy3wResult/index.js +77 -0
- package/lib/Easy3wRow/index.js +53 -0
- package/lib/Easy3wSetCookie/index.js +13 -0
- package/lib/Easy3wSpin/index.js +69 -0
- package/lib/Easy3wTabs/index.js +89 -0
- package/lib/Easy3wTagSelect/index.js +238 -0
- package/lib/Easy3wTree/index.js +318 -0
- package/lib/Easy3wUIConfig/index.js +30 -0
- package/lib/Easy3wUpload/index.js +522 -0
- package/lib/Easy3wUploadB/index copy 2.js +1011 -0
- package/lib/Easy3wUploadB/index copy.js +1020 -0
- package/lib/Easy3wUploadB/index.js +1088 -0
- package/lib/Easy3wUploadM/index.js +523 -0
- package/lib/Easy3wUserLayout/index.js +138 -0
- package/package.json +1 -1
package/assets/login.css
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
2
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
5
|
+
.e3wLoginMain {
|
|
6
|
+
width: 368px;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
z-index: 100;
|
|
9
|
+
}
|
|
10
|
+
.e3wLoginMain .e3wLoginTabs {
|
|
11
|
+
padding: 0 2px;
|
|
12
|
+
margin: 0 -2px;
|
|
13
|
+
}
|
|
14
|
+
.e3wLoginMain .e3wLoginTabs :global .ant-tabs-tab {
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
line-height: 24px;
|
|
17
|
+
}
|
|
18
|
+
.e3wLoginMain .e3wLoginTabs :global .ant-input-affix-wrapper .ant-input:not(:first-child) {
|
|
19
|
+
padding-left: 34px;
|
|
20
|
+
}
|
|
21
|
+
.e3wLoginMain :global .ant-tabs .ant-tabs-bar {
|
|
22
|
+
border-bottom: 0;
|
|
23
|
+
margin-bottom: 24px;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
.e3wLoginMain :global .ant-form-item {
|
|
27
|
+
margin-bottom: 24px;
|
|
28
|
+
}
|
|
29
|
+
.e3wLoginMain :global .ant-tooltip-inner {
|
|
30
|
+
background-color: #fff;
|
|
31
|
+
}
|
|
32
|
+
.e3wLoginMain .e3wLoginPrefixIcon {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
color: rgba(0, 0, 0, 0.25);
|
|
35
|
+
}
|
|
36
|
+
.e3wLoginMain .e3wLoginAdditional {
|
|
37
|
+
text-align: left;
|
|
38
|
+
}
|
|
39
|
+
.e3wLoginMain .e3wLoginAdditional .e3wLoginForgot {
|
|
40
|
+
float: right;
|
|
41
|
+
margin-right: 12px;
|
|
42
|
+
}
|
|
43
|
+
.e3wLoginMain .e3wLoginAdditional .e3wLoginSubmit {
|
|
44
|
+
width: 100%;
|
|
45
|
+
margin-top: 24px;
|
|
46
|
+
display: block;
|
|
47
|
+
}
|
|
48
|
+
.e3wLoginMain .e3wLoginAdditional :global .ant-form-item-control {
|
|
49
|
+
line-height: 22px;
|
|
50
|
+
}
|
|
51
|
+
.e3wLoginMain .e3wLoginOther {
|
|
52
|
+
text-align: left;
|
|
53
|
+
line-height: 22px;
|
|
54
|
+
}
|
|
55
|
+
.e3wLoginMain .e3wLoginOther .e3wLoginRegister {
|
|
56
|
+
float: right;
|
|
57
|
+
margin-right: 12px;
|
|
58
|
+
}
|
|
59
|
+
.e3wLoginMain #pop {
|
|
60
|
+
color: #5468ae;
|
|
61
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
2
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
5
|
+
.e3wLoginLayoutHeader {
|
|
6
|
+
padding: 0 12px 0 0;
|
|
7
|
+
background: #fff;
|
|
8
|
+
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
.e3wLoginLayoutHeader h1 {
|
|
12
|
+
color: #000;
|
|
13
|
+
display: inline-block;
|
|
14
|
+
vertical-align: middle;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
}
|
|
19
|
+
.e3wLoginLayoutLogo {
|
|
20
|
+
height: 64px;
|
|
21
|
+
position: relative;
|
|
22
|
+
line-height: 64px;
|
|
23
|
+
padding-left: 35px;
|
|
24
|
+
transition: all .3s;
|
|
25
|
+
background: #fff;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
.e3wLoginLayoutLogo img {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
height: 24px;
|
|
32
|
+
}
|
|
33
|
+
.e3wLoginLayoutLogo h1 {
|
|
34
|
+
color: #fff;
|
|
35
|
+
display: inline-block;
|
|
36
|
+
vertical-align: middle;
|
|
37
|
+
font-size: 20px;
|
|
38
|
+
margin: 0 0 0 12px;
|
|
39
|
+
font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
}
|
|
42
|
+
.e3wLoginLayoutTrigger {
|
|
43
|
+
font-size: 20px;
|
|
44
|
+
line-height: 64px;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
transition: all .3s;
|
|
47
|
+
padding: 0 24px;
|
|
48
|
+
}
|
|
49
|
+
.e3wLoginLayoutTrigger:hover {
|
|
50
|
+
background: #e6f7ff;
|
|
51
|
+
}
|
|
52
|
+
.e3wLoginLayoutRight {
|
|
53
|
+
float: right;
|
|
54
|
+
height: 100%;
|
|
55
|
+
}
|
|
56
|
+
.e3wLoginLayoutRight .schedule {
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
padding: 12px 12px;
|
|
59
|
+
display: inline-block;
|
|
60
|
+
transition: all .3s;
|
|
61
|
+
height: 100%;
|
|
62
|
+
}
|
|
63
|
+
.e3wLoginLayoutRight .schedule > i {
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
vertical-align: middle;
|
|
66
|
+
}
|
|
67
|
+
.e3wLoginLayoutRight .schedule:global(.ant-popover-open),
|
|
68
|
+
.e3wLoginLayoutRight .schedule:hover {
|
|
69
|
+
background: #e6f7ff;
|
|
70
|
+
}
|
|
71
|
+
.e3wLoginLayoutRight .e3wLoginLayoutAction {
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
padding: 0 12px;
|
|
74
|
+
display: inline-block;
|
|
75
|
+
transition: all .3s;
|
|
76
|
+
height: 100%;
|
|
77
|
+
}
|
|
78
|
+
.e3wLoginLayoutRight .e3wLoginLayoutAction > i {
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
vertical-align: middle;
|
|
81
|
+
}
|
|
82
|
+
.e3wLoginLayoutRight .e3wLoginLayoutAction:global(.ant-popover-open),
|
|
83
|
+
.e3wLoginLayoutRight .e3wLoginLayoutAction:hover {
|
|
84
|
+
background: #e6f7ff;
|
|
85
|
+
}
|
|
86
|
+
.e3wLoginLayoutRight .search {
|
|
87
|
+
padding: 0;
|
|
88
|
+
margin: 0 12px;
|
|
89
|
+
}
|
|
90
|
+
.e3wLoginLayoutRight .search:hover {
|
|
91
|
+
background: transparent;
|
|
92
|
+
}
|
|
93
|
+
.e3wLoginLayoutRight .e3wLoginLayoutAccount .e3wLoginLayoutAvatar {
|
|
94
|
+
margin: 20px 8px 20px 0;
|
|
95
|
+
color: #1890ff;
|
|
96
|
+
background: rgba(255, 255, 255, 0.85);
|
|
97
|
+
vertical-align: middle;
|
|
98
|
+
}
|
|
99
|
+
.e3wLoginLayoutRight .e3wLoginLayoutIcon {
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
padding: 4px;
|
|
102
|
+
}
|
|
103
|
+
.e3wLoginLayoutMenu :global(.anticon) {
|
|
104
|
+
margin-right: 8px;
|
|
105
|
+
}
|
|
106
|
+
.e3wLoginLayoutMenu :global(.ant-dropdown-menu-item) {
|
|
107
|
+
width: 160px;
|
|
108
|
+
}
|
|
109
|
+
.e3wLoginLayoutSider {
|
|
110
|
+
min-height: 100vh;
|
|
111
|
+
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
|
|
112
|
+
position: relative;
|
|
113
|
+
z-index: 10;
|
|
114
|
+
background: #21273f;
|
|
115
|
+
}
|
package/assets/modal.css
ADDED
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
2
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
5
|
+
.e3wResult {
|
|
6
|
+
text-align: center;
|
|
7
|
+
width: 72%;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
}
|
|
10
|
+
.e3wResult .e3wResultIcon {
|
|
11
|
+
font-size: 72px;
|
|
12
|
+
line-height: 72px;
|
|
13
|
+
margin-bottom: 24px;
|
|
14
|
+
}
|
|
15
|
+
.e3wResult .e3wResultIcon > .e3wResultSuccess {
|
|
16
|
+
color: #52c41a;
|
|
17
|
+
}
|
|
18
|
+
.e3wResult .e3wResultIcon > .e3wResultError {
|
|
19
|
+
color: #f5222d;
|
|
20
|
+
}
|
|
21
|
+
.e3wResult .e3wResultTitle {
|
|
22
|
+
font-size: 24px;
|
|
23
|
+
color: rgba(0, 0, 0, 0.85);
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
line-height: 32px;
|
|
26
|
+
margin-bottom: 16px;
|
|
27
|
+
}
|
|
28
|
+
.e3wResult .e3wResultDescription {
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
line-height: 22px;
|
|
31
|
+
color: rgba(0, 0, 0, 0.45);
|
|
32
|
+
margin-bottom: 24px;
|
|
33
|
+
}
|
|
34
|
+
.e3wResult .e3wResultExtra {
|
|
35
|
+
background: #fafafa;
|
|
36
|
+
padding: 24px 40px;
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
text-align: left;
|
|
39
|
+
}
|
|
40
|
+
.e3wResult .e3wResultActions {
|
|
41
|
+
margin-top: 32px;
|
|
42
|
+
}
|
|
43
|
+
.e3wResult .e3wResultActions e3wResultButton:not(:last-child) {
|
|
44
|
+
margin-right: 8px;
|
|
45
|
+
}
|
package/assets/tree.css
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
|
|
2
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
|
|
5
|
+
.e3wUserLayoutContainer {
|
|
6
|
+
background: #f0f2f5;
|
|
7
|
+
width: 100%;
|
|
8
|
+
min-height: 100%;
|
|
9
|
+
background-repeat: no-repeat;
|
|
10
|
+
background-position: center;
|
|
11
|
+
background-size: 100%;
|
|
12
|
+
padding: 40px 0 0 0;
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
15
|
+
.e3wUserLayoutTop {
|
|
16
|
+
text-align: center;
|
|
17
|
+
}
|
|
18
|
+
.e3wUserLayoutHeader {
|
|
19
|
+
padding: 0 12px 0 0;
|
|
20
|
+
background: #fff;
|
|
21
|
+
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
.e3wUserLayoutRight {
|
|
25
|
+
float: right;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
.e3wUserLayoutLogo {
|
|
29
|
+
float: left;
|
|
30
|
+
height: 100%;
|
|
31
|
+
line-height: 64px;
|
|
32
|
+
padding-left: 24px;
|
|
33
|
+
transition: all .3s;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
.e3wUserLayoutLogo img {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
vertical-align: middle;
|
|
39
|
+
height: 32px;
|
|
40
|
+
}
|
|
41
|
+
.e3wUserLayoutLogo h1 {
|
|
42
|
+
color: #000;
|
|
43
|
+
display: inline-block;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
margin: 0 0 0 12px;
|
|
47
|
+
font-family: AppleSystemUIFont, 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
48
|
+
font-weight: 400;
|
|
49
|
+
}
|
|
50
|
+
.e3wUserLayoutTitle {
|
|
51
|
+
font-size: 33px;
|
|
52
|
+
color: rgba(0, 0, 0, 0.85);
|
|
53
|
+
font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
position: relative;
|
|
56
|
+
top: 2px;
|
|
57
|
+
}
|
|
58
|
+
.e3wUserLayoutDesc {
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
color: rgba(0, 0, 0, 0.45);
|
|
61
|
+
margin-top: 12px;
|
|
62
|
+
margin-bottom: 40px;
|
|
63
|
+
}
|
|
64
|
+
.e3wUserLayoutFooter {
|
|
65
|
+
bottom: 0px;
|
|
66
|
+
left: 0px;
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: 50px;
|
|
69
|
+
z-index: 99;
|
|
70
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 _reactDataGrid = require('react-data-grid');
|
|
26
|
+
|
|
27
|
+
var _reactDataGrid2 = _interopRequireDefault(_reactDataGrid);
|
|
28
|
+
|
|
29
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
30
|
+
|
|
31
|
+
var editors = _reactDataGrid2['default'].editors;
|
|
32
|
+
var EditorBase = editors.EditorBase;
|
|
33
|
+
|
|
34
|
+
var EditorNumber = function (_EditorBase) {
|
|
35
|
+
(0, _inherits3['default'])(EditorNumber, _EditorBase);
|
|
36
|
+
|
|
37
|
+
function EditorNumber() {
|
|
38
|
+
var _temp, _this, _ret;
|
|
39
|
+
|
|
40
|
+
(0, _classCallCheck3['default'])(this, EditorNumber);
|
|
41
|
+
|
|
42
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
|
+
args[_key] = arguments[_key];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _EditorBase.call.apply(_EditorBase, [this].concat(args))), _this), _this.setInputRef = function (input) {
|
|
47
|
+
_this.input = input;
|
|
48
|
+
}, _this.getInputNode = function () {
|
|
49
|
+
return _this.setInputRef();
|
|
50
|
+
}, _this.getValue = function () {
|
|
51
|
+
var _ref;
|
|
52
|
+
|
|
53
|
+
// const { value } = this.state;
|
|
54
|
+
return _ref = {}, _ref[_this.props.column.key] = _this.getInputNode().value, _ref;
|
|
55
|
+
}, _this.onBlur = function (event) {
|
|
56
|
+
var _this$props = _this.props,
|
|
57
|
+
onBlur = _this$props.onBlur,
|
|
58
|
+
onCommit = _this$props.onCommit;
|
|
59
|
+
|
|
60
|
+
if (onBlur && typeof onBlur === 'function') {
|
|
61
|
+
onBlur(event);
|
|
62
|
+
}
|
|
63
|
+
if (onCommit && typeof onCommit === 'function') {
|
|
64
|
+
onCommit();
|
|
65
|
+
}
|
|
66
|
+
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
|
|
67
|
+
}
|
|
68
|
+
// 获取 input 节点
|
|
69
|
+
|
|
70
|
+
// 获取 input 值
|
|
71
|
+
|
|
72
|
+
// input 失去焦点
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
EditorNumber.prototype.render = function render() {
|
|
76
|
+
var value = this.props.value;
|
|
77
|
+
|
|
78
|
+
return _react2['default'].createElement('input', (0, _extends3['default'])({
|
|
79
|
+
ref: this.setInputRef,
|
|
80
|
+
type: 'number',
|
|
81
|
+
className: 'form-control',
|
|
82
|
+
defaultValue: value
|
|
83
|
+
}, this.props, {
|
|
84
|
+
onBlur: this.onBlur
|
|
85
|
+
}));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return EditorNumber;
|
|
89
|
+
}(EditorBase);
|
|
90
|
+
|
|
91
|
+
exports['default'] = EditorNumber;
|
|
92
|
+
module.exports = exports['default'];
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _datePicker = require('antd/lib/date-picker');
|
|
6
|
+
|
|
7
|
+
var _datePicker2 = _interopRequireDefault(_datePicker);
|
|
8
|
+
|
|
9
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
10
|
+
|
|
11
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
12
|
+
|
|
13
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
14
|
+
|
|
15
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
16
|
+
|
|
17
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
18
|
+
|
|
19
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
20
|
+
|
|
21
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
22
|
+
|
|
23
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
24
|
+
|
|
25
|
+
require('antd/lib/date-picker/style');
|
|
26
|
+
|
|
27
|
+
var _react = require('react');
|
|
28
|
+
|
|
29
|
+
var _react2 = _interopRequireDefault(_react);
|
|
30
|
+
|
|
31
|
+
var _antd = require('antd');
|
|
32
|
+
|
|
33
|
+
var _zh_CN = require('antd/lib/date-picker/locale/zh_CN');
|
|
34
|
+
|
|
35
|
+
var _zh_CN2 = _interopRequireDefault(_zh_CN);
|
|
36
|
+
|
|
37
|
+
require('moment/locale/zh-cn');
|
|
38
|
+
|
|
39
|
+
var _moment = require('moment');
|
|
40
|
+
|
|
41
|
+
var _moment2 = _interopRequireDefault(_moment);
|
|
42
|
+
|
|
43
|
+
var _reactDataGrid = require('react-data-grid');
|
|
44
|
+
|
|
45
|
+
var _reactDataGrid2 = _interopRequireDefault(_reactDataGrid);
|
|
46
|
+
|
|
47
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
48
|
+
|
|
49
|
+
var editors = _reactDataGrid2['default'].editors;
|
|
50
|
+
// import ReactDOM from 'react-dom';
|
|
51
|
+
|
|
52
|
+
var EditorBase = editors.EditorBase;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
_moment2['default'].locale('zh-cn');
|
|
56
|
+
var dateFormatDefault = 'YYYY-MM-DD';
|
|
57
|
+
|
|
58
|
+
var EditorsDatePicker = function (_React$Component) {
|
|
59
|
+
(0, _inherits3['default'])(EditorsDatePicker, _React$Component);
|
|
60
|
+
|
|
61
|
+
function EditorsDatePicker(props) {
|
|
62
|
+
(0, _classCallCheck3['default'])(this, EditorsDatePicker);
|
|
63
|
+
|
|
64
|
+
var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props));
|
|
65
|
+
|
|
66
|
+
_initialiseProps.call(_this);
|
|
67
|
+
|
|
68
|
+
var value = props.value,
|
|
69
|
+
refCallback = props.refCallback;
|
|
70
|
+
|
|
71
|
+
if (refCallback && refCallback instanceof Function) {
|
|
72
|
+
refCallback(_this);
|
|
73
|
+
}
|
|
74
|
+
_this.state = {
|
|
75
|
+
value: value
|
|
76
|
+
};
|
|
77
|
+
return _this;
|
|
78
|
+
}
|
|
79
|
+
// 获取组件节点
|
|
80
|
+
|
|
81
|
+
// 设置样式
|
|
82
|
+
|
|
83
|
+
// 获取 input 节点
|
|
84
|
+
|
|
85
|
+
// 获取 input 值
|
|
86
|
+
|
|
87
|
+
// input 值改变时回调
|
|
88
|
+
|
|
89
|
+
// input 失去焦点时回调
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
EditorsDatePicker.prototype.render = function render() {
|
|
93
|
+
var _props$cmptPros = this.props.cmptPros,
|
|
94
|
+
cmptPros = _props$cmptPros === undefined ? {} : _props$cmptPros;
|
|
95
|
+
var dateFormat = cmptPros.dateFormat;
|
|
96
|
+
var value = this.state.value;
|
|
97
|
+
|
|
98
|
+
return _react2['default'].createElement(_datePicker2['default'], (0, _extends3['default'])({
|
|
99
|
+
style: this.getStyle(),
|
|
100
|
+
autoFocus: true,
|
|
101
|
+
locale: _zh_CN2['default'],
|
|
102
|
+
format: dateFormat || dateFormatDefault,
|
|
103
|
+
value: value ? (0, _moment2['default'])(value, dateFormat || dateFormatDefault) : null,
|
|
104
|
+
ref: this.getReactDataGridZJ
|
|
105
|
+
// autoFocus
|
|
106
|
+
}, cmptPros, {
|
|
107
|
+
onChange: this.onChange,
|
|
108
|
+
onBlur: this.onBlur
|
|
109
|
+
}));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
return EditorsDatePicker;
|
|
113
|
+
}(_react2['default'].Component);
|
|
114
|
+
|
|
115
|
+
var _initialiseProps = function _initialiseProps() {
|
|
116
|
+
var _this2 = this;
|
|
117
|
+
|
|
118
|
+
this.getReactDataGridZJ = function (el) {
|
|
119
|
+
_this2.EditorsZJ = el;
|
|
120
|
+
return el;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
this.getStyle = function () {
|
|
124
|
+
return {
|
|
125
|
+
width: '100%',
|
|
126
|
+
minWidth: '120px'
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
this.getInputNode = function () {
|
|
131
|
+
return _this2.getReactDataGridZJ();
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
this.getValue = function () {
|
|
135
|
+
var _ref;
|
|
136
|
+
|
|
137
|
+
var value = _this2.state.value;
|
|
138
|
+
|
|
139
|
+
return _ref = {}, _ref[_this2.props.column.key] = value, _ref;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
this.onChange = function (momentDate, strDate) {
|
|
143
|
+
var _props = _this2.props,
|
|
144
|
+
onChange = _props.onChange,
|
|
145
|
+
_props$cmptPros2 = _props.cmptPros,
|
|
146
|
+
cmptPros = _props$cmptPros2 === undefined ? {} : _props$cmptPros2;
|
|
147
|
+
var dateFormat = cmptPros.dateFormat;
|
|
148
|
+
|
|
149
|
+
if (onChange) {
|
|
150
|
+
onChange(momentDate, strDate);
|
|
151
|
+
}
|
|
152
|
+
var value = momentDate ? momentDate.format(dateFormat || dateFormatDefault) : null;
|
|
153
|
+
_this2.setState({ value: value });
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
this.onBlur = function () {
|
|
157
|
+
var _props2 = _this2.props,
|
|
158
|
+
onCommit = _props2.onCommit,
|
|
159
|
+
onBlur = _props2.onBlur;
|
|
160
|
+
|
|
161
|
+
if (onCommit) {
|
|
162
|
+
onCommit();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
exports['default'] = EditorsDatePicker;
|
|
168
|
+
module.exports = exports['default'];
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _inputNumber = require('antd/lib/input-number');
|
|
6
|
+
|
|
7
|
+
var _inputNumber2 = _interopRequireDefault(_inputNumber);
|
|
8
|
+
|
|
9
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
10
|
+
|
|
11
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
12
|
+
|
|
13
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
14
|
+
|
|
15
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
16
|
+
|
|
17
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
18
|
+
|
|
19
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
20
|
+
|
|
21
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
22
|
+
|
|
23
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
24
|
+
|
|
25
|
+
require('antd/lib/input-number/style');
|
|
26
|
+
|
|
27
|
+
var _react = require('react');
|
|
28
|
+
|
|
29
|
+
var _react2 = _interopRequireDefault(_react);
|
|
30
|
+
|
|
31
|
+
var _reactDom = require('react-dom');
|
|
32
|
+
|
|
33
|
+
var _reactDom2 = _interopRequireDefault(_reactDom);
|
|
34
|
+
|
|
35
|
+
var _antd = require('antd');
|
|
36
|
+
|
|
37
|
+
var _reactDataGrid = require('react-data-grid');
|
|
38
|
+
|
|
39
|
+
var _reactDataGrid2 = _interopRequireDefault(_reactDataGrid);
|
|
40
|
+
|
|
41
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
42
|
+
|
|
43
|
+
var editors = _reactDataGrid2['default'].editors;
|
|
44
|
+
var EditorBase = editors.EditorBase;
|
|
45
|
+
|
|
46
|
+
var EditorsInputNumber = function (_React$Component) {
|
|
47
|
+
(0, _inherits3['default'])(EditorsInputNumber, _React$Component);
|
|
48
|
+
|
|
49
|
+
function EditorsInputNumber(props) {
|
|
50
|
+
(0, _classCallCheck3['default'])(this, EditorsInputNumber);
|
|
51
|
+
|
|
52
|
+
var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props));
|
|
53
|
+
|
|
54
|
+
_initialiseProps.call(_this);
|
|
55
|
+
|
|
56
|
+
var value = props.value,
|
|
57
|
+
refCallback = props.refCallback;
|
|
58
|
+
|
|
59
|
+
if (refCallback && refCallback instanceof Function) {
|
|
60
|
+
refCallback(_this);
|
|
61
|
+
}
|
|
62
|
+
_this.state = {
|
|
63
|
+
value: value
|
|
64
|
+
};
|
|
65
|
+
return _this;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
EditorsInputNumber.prototype.componentDidMount = function componentDidMount() {
|
|
69
|
+
var domNode = this.getInputNode();
|
|
70
|
+
console.log('inputNode', domNode);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
EditorsInputNumber.prototype.componentWillUnmount = function componentWillUnmount() {};
|
|
74
|
+
// 设置样式
|
|
75
|
+
|
|
76
|
+
// 获取 input 节点
|
|
77
|
+
|
|
78
|
+
// 获取 input 值
|
|
79
|
+
|
|
80
|
+
// input 值改变时回调
|
|
81
|
+
|
|
82
|
+
// input 失去焦点时回调
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
EditorsInputNumber.prototype.render = function render() {
|
|
86
|
+
var cmptPros = this.props.cmptPros;
|
|
87
|
+
var value = this.state.value;
|
|
88
|
+
|
|
89
|
+
return _react2['default'].createElement(_inputNumber2['default'], (0, _extends3['default'])({
|
|
90
|
+
style: this.getStyle(),
|
|
91
|
+
value: value,
|
|
92
|
+
onChange: this.onChange,
|
|
93
|
+
onBlur: this.onBlur,
|
|
94
|
+
autoFocus: true
|
|
95
|
+
}, cmptPros));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return EditorsInputNumber;
|
|
99
|
+
}(_react2['default'].Component);
|
|
100
|
+
|
|
101
|
+
var _initialiseProps = function _initialiseProps() {
|
|
102
|
+
var _this2 = this;
|
|
103
|
+
|
|
104
|
+
this.getStyle = function () {
|
|
105
|
+
return {
|
|
106
|
+
width: '100%'
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
this.getInputNode = function () {
|
|
111
|
+
return _reactDom2['default'].findDOMNode(_this2);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
this.getValue = function () {
|
|
115
|
+
var _ref;
|
|
116
|
+
|
|
117
|
+
var value = _this2.state.value;
|
|
118
|
+
|
|
119
|
+
return _ref = {}, _ref[_this2.props.column.key] = value, _ref;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
this.onChange = function (value) {
|
|
123
|
+
var onChange = _this2.props.onChange;
|
|
124
|
+
|
|
125
|
+
if (onChange) {
|
|
126
|
+
onChange(value);
|
|
127
|
+
}
|
|
128
|
+
_this2.setState({ value: value });
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
this.onBlur = function () {
|
|
132
|
+
var onCommit = _this2.props.onCommit;
|
|
133
|
+
|
|
134
|
+
if (onCommit) {
|
|
135
|
+
onCommit();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
exports['default'] = EditorsInputNumber;
|
|
141
|
+
module.exports = exports['default'];
|