@titaui/pc 1.7.101 → 1.8.3
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/components/dialog/index.css +7 -1
- package/lib/components/dialog/index.js +7 -6
- package/lib/components/form/form-fields/input/index.css +22 -7
- package/lib/components/form/form-fields/input/index.js +11 -8
- package/lib/components/form/form-fields/input-verification-code/index.css +117 -0
- package/lib/components/form/form-fields/input-verification-code/index.js +230 -0
- package/lib/components/form/form-fields/password/index.css +2 -2
- package/lib/components/form/form-fields/radios/index.js +1 -1
- package/lib/components/form/index.js +4 -1
- package/lib/components/nav-top/components/user-message/components/empty/index.js +4 -2
- package/lib/components/nav-top/components/user-message/msg/index.js +1 -1
- package/lib/components/table/index.css +4 -0
- package/lib/components/table/index.js +3 -0
- package/lib/components/upload/index.js +2 -2
- package/lib/components/upload-photo-modal/constant.js +29 -0
- package/lib/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
- package/lib/components/upload-photo-modal/index.css +288 -0
- package/lib/components/upload-photo-modal/index.js +439 -0
- package/lib/components/upload-photo-modal/request-api.js +62 -0
- package/lib/components/user-selector/request-apis.js +1 -1
- package/lib/index.js +8 -0
- package/lib/pages/personal-info/components/base-info/index.css +36 -1
- package/lib/pages/personal-info/components/base-info/index.js +22 -90
- package/lib/pages/personal-info/components/edit-info/index.css +19 -0
- package/lib/pages/personal-info/components/edit-info/index.js +209 -0
- package/lib/pages/personal-info/components/edit-info/input/index.css +89 -0
- package/lib/pages/personal-info/components/edit-info/input/index.js +199 -0
- package/lib/pages/personal-info/components/person-photo/index.css +88 -0
- package/lib/pages/personal-info/components/person-photo/index.js +86 -0
- package/lib/pages/personal-info/index.js +3 -1
- package/package.json +3 -1
- package/src/components/dialog/index.js +2 -1
- package/src/components/dialog/index.scss +6 -1
- package/src/components/form/form-fields/input/index.scss +19 -7
- package/src/components/form/form-fields/input/index.tsx +9 -4
- package/src/components/form/form-fields/input-verification-code/index.scss +108 -0
- package/src/components/form/form-fields/input-verification-code/index.tsx +171 -0
- package/src/components/form/form-fields/password/index.scss +2 -2
- package/src/components/form/form-fields/radios/index.tsx +2 -2
- package/src/components/form/index.tsx +2 -0
- package/src/components/nav-top/components/user-message/components/empty/index.tsx +3 -2
- package/src/components/nav-top/components/user-message/msg/index.tsx +1 -1
- package/src/components/table/index.js +1 -0
- package/src/components/table/index.scss +5 -0
- package/src/components/upload/index.tsx +4 -4
- package/src/components/upload-photo-modal/constant.ts +27 -0
- package/src/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
- package/src/components/upload-photo-modal/index.scss +258 -0
- package/src/components/upload-photo-modal/index.tsx +331 -0
- package/src/components/upload-photo-modal/request-api.ts +33 -0
- package/src/components/user-selector/request-apis.js +1 -1
- package/src/index.js +1 -0
- package/src/pages/personal-info/components/base-info/index.scss +30 -1
- package/src/pages/personal-info/components/base-info/index.tsx +26 -97
- package/src/pages/personal-info/components/edit-info/index.scss +20 -0
- package/src/pages/personal-info/components/edit-info/index.tsx +166 -0
- package/src/pages/personal-info/components/edit-info/input/index.scss +82 -0
- package/src/pages/personal-info/components/edit-info/input/index.tsx +145 -0
- package/src/pages/personal-info/components/person-photo/index.scss +80 -0
- package/src/pages/personal-info/components/person-photo/index.tsx +49 -0
- package/src/pages/personal-info/index.tsx +2 -0
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
.titaui-dialog .rc-dialog-header {
|
|
53
53
|
padding: 18px 32px;
|
|
54
|
+
margin-bottom: 10px;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
.titaui-dialog .rc-dialog-body {
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
|
|
60
61
|
.titaui-dialog .rc-dialog-footer {
|
|
61
62
|
padding: 20px 32px;
|
|
63
|
+
margin-top: 8px;
|
|
62
64
|
display: flex;
|
|
63
65
|
justify-content: flex-end;
|
|
64
66
|
}
|
|
@@ -100,8 +102,12 @@
|
|
|
100
102
|
color: #ffffff;
|
|
101
103
|
}
|
|
102
104
|
|
|
105
|
+
.titaui-dialog__btn-ok-not-allowed {
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
}
|
|
108
|
+
|
|
103
109
|
.titaui-dialog__btn-cancel {
|
|
104
|
-
border: 1px solid #
|
|
110
|
+
border: 1px solid #DFE3EA;
|
|
105
111
|
color: #6f7886;
|
|
106
112
|
transition: 0.2s all;
|
|
107
113
|
}
|
|
@@ -17,14 +17,12 @@ require("rc-dialog/assets/index.css");
|
|
|
17
17
|
|
|
18
18
|
require("./index.css");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["onOk", "onCancel", "okText", "cancelText", "footer", "noFooter", "noHeadLine", "noCloseIcon", "noFooterLine", "visible", "extraClass", "extendFooterBtn"];
|
|
20
|
+
var _excluded = ["onOk", "onCancel", "okText", "cancelText", "footer", "noFooter", "noHeadLine", "noCloseIcon", "noFooterLine", "visible", "extraClass", "extendFooterBtn", "disabled"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
24
24
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
|
|
28
26
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
29
27
|
|
|
30
28
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -37,6 +35,8 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
37
35
|
|
|
38
36
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
37
|
|
|
38
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
+
|
|
40
40
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
41
|
|
|
42
42
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -44,7 +44,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
44
44
|
var preCls = 'titaui-dialog';
|
|
45
45
|
|
|
46
46
|
var _default = function _default(props) {
|
|
47
|
-
var
|
|
47
|
+
var _classNames2;
|
|
48
48
|
|
|
49
49
|
var _props$onOk = props.onOk,
|
|
50
50
|
onOk = _props$onOk === void 0 ? function () {
|
|
@@ -67,6 +67,7 @@ var _default = function _default(props) {
|
|
|
67
67
|
_props$extraClass = props.extraClass,
|
|
68
68
|
extraClass = _props$extraClass === void 0 ? [] : _props$extraClass,
|
|
69
69
|
extendFooterBtn = props.extendFooterBtn,
|
|
70
|
+
disabled = props.disabled,
|
|
70
71
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
71
72
|
|
|
72
73
|
var baseFooter = [extendFooterBtn, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -77,14 +78,14 @@ var _default = function _default(props) {
|
|
|
77
78
|
className: (0, _classnames["default"])("".concat(preCls, "__btn-cancel-text"))
|
|
78
79
|
}, cancelText)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
79
80
|
key: "ok",
|
|
80
|
-
className: (0, _classnames["default"])("".concat(preCls, "__btn"), "".concat(preCls, "__btn-ok")),
|
|
81
|
+
className: (0, _classnames["default"])("".concat(preCls, "__btn"), "".concat(preCls, "__btn-ok"), _defineProperty({}, "".concat(preCls, "__btn-ok-not-allowed"), disabled)),
|
|
81
82
|
onClick: onOk
|
|
82
83
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
83
84
|
className: (0, _classnames["default"])("".concat(preCls, "__btn-ok-text"))
|
|
84
85
|
}, okText))];
|
|
85
86
|
return /*#__PURE__*/_react["default"].createElement(_rcDialog["default"], _extends({
|
|
86
87
|
visible: visible,
|
|
87
|
-
className: (0, _classnames["default"])(preCls, _toConsumableArray(extraClass), (
|
|
88
|
+
className: (0, _classnames["default"])(preCls, _toConsumableArray(extraClass), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(preCls, "-no-head-line"), noHeadLine), _defineProperty(_classNames2, "".concat(preCls, "-no-footer-line"), noFooterLine), _defineProperty(_classNames2, "".concat(preCls, "-no-close"), noCloseIcon), _defineProperty(_classNames2, "".concat(preCls, "-no-footer"), noFooter), _classNames2)),
|
|
88
89
|
closeIcon: /*#__PURE__*/_react["default"].createElement("span", {
|
|
89
90
|
className: "tu-icon-close"
|
|
90
91
|
}),
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
.form-field-input-row {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.form-field-input-row .form-field-input__label {
|
|
7
|
+
margin-bottom: unset;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.form-field-input-row .form-field-input__border {
|
|
11
|
+
margin-left: 16px;
|
|
12
|
+
flex: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
.form-field-input__label {
|
|
2
16
|
height: 22px;
|
|
3
17
|
font-size: 14px;
|
|
@@ -12,14 +26,15 @@
|
|
|
12
26
|
}
|
|
13
27
|
|
|
14
28
|
.form-field-input__label-require {
|
|
15
|
-
color:
|
|
29
|
+
color: #F05E5E;
|
|
30
|
+
margin-left: 2px;
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
.form-field-input__border {
|
|
19
34
|
padding: 6px 12px;
|
|
20
|
-
border-radius:
|
|
35
|
+
border-radius: 8px;
|
|
21
36
|
transition: all 0.2s;
|
|
22
|
-
border: 1px solid #
|
|
37
|
+
border: 1px solid #DFE3EA;
|
|
23
38
|
box-sizing: border-box;
|
|
24
39
|
}
|
|
25
40
|
|
|
@@ -35,13 +50,13 @@
|
|
|
35
50
|
}
|
|
36
51
|
|
|
37
52
|
.form-field-input__border--error {
|
|
38
|
-
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3)
|
|
39
|
-
border: 1px solid #f05e5e
|
|
53
|
+
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3);
|
|
54
|
+
border: 1px solid #f05e5e;
|
|
40
55
|
}
|
|
41
56
|
|
|
42
57
|
.form-field-input__border--active {
|
|
43
|
-
box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3);
|
|
44
|
-
border: 1px solid #2879ff;
|
|
58
|
+
box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3) !important;
|
|
59
|
+
border: 1px solid #2879ff !important;
|
|
45
60
|
}
|
|
46
61
|
|
|
47
62
|
.form-field-input__input {
|
|
@@ -41,21 +41,21 @@ var OverlayInner = function OverlayInner(_ref) {
|
|
|
41
41
|
var hasError = _ref.hasError,
|
|
42
42
|
hasActive = _ref.hasActive,
|
|
43
43
|
tip = _ref.tip;
|
|
44
|
-
if (
|
|
44
|
+
if (hasActive) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
45
45
|
style: {
|
|
46
|
-
'color': '#
|
|
46
|
+
'color': '#3F4755'
|
|
47
47
|
}
|
|
48
48
|
}, tip);
|
|
49
|
-
if (
|
|
49
|
+
if (hasError) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
50
50
|
style: {
|
|
51
|
-
'color': '#
|
|
51
|
+
'color': '#F05E5E'
|
|
52
52
|
}
|
|
53
53
|
}, tip);
|
|
54
54
|
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
58
|
-
var
|
|
58
|
+
var _classNames2;
|
|
59
59
|
|
|
60
60
|
var label = props.label,
|
|
61
61
|
verifies = props.verifies,
|
|
@@ -65,7 +65,10 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
65
65
|
type = props.type,
|
|
66
66
|
name = props.name,
|
|
67
67
|
disabled = props.disabled,
|
|
68
|
-
getContainer = props.getContainer
|
|
68
|
+
getContainer = props.getContainer,
|
|
69
|
+
layout = props.layout,
|
|
70
|
+
_props$className = props.className,
|
|
71
|
+
className = _props$className === void 0 ? "" : _props$className;
|
|
69
72
|
var inputRef = (0, _react.useRef)();
|
|
70
73
|
|
|
71
74
|
var _useState = (0, _react.useState)(false),
|
|
@@ -155,7 +158,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
155
158
|
};
|
|
156
159
|
});
|
|
157
160
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
|
-
className: (0, _classnames["default"])(preCls)
|
|
161
|
+
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "-row"), layout === 'row'), className)
|
|
159
162
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
160
163
|
className: (0, _classnames["default"])("".concat(preCls, "__label"))
|
|
161
164
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -163,7 +166,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
163
166
|
}, label), require && /*#__PURE__*/_react["default"].createElement("span", {
|
|
164
167
|
className: (0, _classnames["default"])("".concat(preCls, "__label-require"))
|
|
165
168
|
}, "*")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
|
-
className: (0, _classnames["default"])("".concat(preCls, "__border"), (
|
|
169
|
+
className: (0, _classnames["default"])("".concat(preCls, "__border"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(preCls, "__border--error"), hasError), _defineProperty(_classNames2, "".concat(preCls, "__border--active"), hasActive), _defineProperty(_classNames2, "".concat(preCls, "__border--disabled"), disabled), _classNames2))
|
|
167
170
|
}, /*#__PURE__*/_react["default"].createElement(_errorTip["default"], {
|
|
168
171
|
placement: 'topLeft',
|
|
169
172
|
destroyTooltipOnHide: true,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
.verification-code-input-row {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.verification-code-input-row .verification-code-input__label {
|
|
7
|
+
margin-bottom: unset;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.verification-code-input-row .verification-code-input__border {
|
|
11
|
+
margin-left: 16px;
|
|
12
|
+
flex: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.verification-code-input__label {
|
|
16
|
+
height: 22px;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
margin-bottom: 5px;
|
|
19
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
line-height: 22px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.verification-code-input__label-text {
|
|
25
|
+
color: #3f4755;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.verification-code-input__label-require {
|
|
29
|
+
color: red;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.verification-code-input__border {
|
|
33
|
+
padding: 6px 12px;
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
transition: all 0.2s;
|
|
36
|
+
border: 1px solid #e9ecf0;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
position: relative;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.verification-code-input__border--disabled {
|
|
42
|
+
background-color: #fafafa;
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.verification-code-input__border--disabled input:disabled {
|
|
47
|
+
background-color: #fafafa;
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
color: #3f475594;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.verification-code-input__border--error {
|
|
53
|
+
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3);
|
|
54
|
+
border: 1px solid #f05e5e;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.verification-code-input__border--active {
|
|
58
|
+
box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3) !important;
|
|
59
|
+
border: 1px solid #2879ff !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.verification-code-input__input {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
padding: 0;
|
|
65
|
+
width: calc(100% - 102px);
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
color: #3f4755;
|
|
70
|
+
height: 22px;
|
|
71
|
+
line-height: inherit;
|
|
72
|
+
border: none;
|
|
73
|
+
flex: 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.verification-code-input__input::-webkit-input-placeholder {
|
|
77
|
+
color: #bfc7d5;
|
|
78
|
+
font-weight: unset;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.verification-code-input__input::-moz-placeholder {
|
|
82
|
+
color: #bfc7d5;
|
|
83
|
+
font-weight: unset;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.verification-code-input__input:-moz-placeholder {
|
|
87
|
+
color: #bfc7d5;
|
|
88
|
+
font-weight: unset;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.verification-code-input__input:-ms-input-placeholder {
|
|
92
|
+
color: #bfc7d5;
|
|
93
|
+
font-weight: unset;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.verification-code-input__btn {
|
|
97
|
+
width: 100px;
|
|
98
|
+
height: 34px;
|
|
99
|
+
background: #D4E4FF;
|
|
100
|
+
border-radius: 0px 8px 8px 0px;
|
|
101
|
+
border-left: 1px solid #DFE3EA;
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
color: #2879FF;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
line-height: 34px;
|
|
107
|
+
text-align: center;
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 0px;
|
|
110
|
+
right: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.verification-code-input__btn--not {
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
color: #A4ACB9;
|
|
116
|
+
background: #F7F8FA;
|
|
117
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _errorTip = _interopRequireDefault(require("../../../tooltip/error-tip"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var preCls = 'verification-code-input';
|
|
39
|
+
|
|
40
|
+
var OverlayInner = function OverlayInner(_ref) {
|
|
41
|
+
var hasError = _ref.hasError,
|
|
42
|
+
hasActive = _ref.hasActive,
|
|
43
|
+
tip = _ref.tip;
|
|
44
|
+
if (hasActive) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
45
|
+
style: {
|
|
46
|
+
'color': '#3F4755'
|
|
47
|
+
}
|
|
48
|
+
}, tip);
|
|
49
|
+
if (hasError) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
50
|
+
style: {
|
|
51
|
+
'color': '#F05E5E'
|
|
52
|
+
}
|
|
53
|
+
}, tip);
|
|
54
|
+
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
58
|
+
var _classNames2;
|
|
59
|
+
|
|
60
|
+
var label = props.label,
|
|
61
|
+
verifies = props.verifies,
|
|
62
|
+
placeholder = props.placeholder,
|
|
63
|
+
onChange = props.onChange,
|
|
64
|
+
require = props.require,
|
|
65
|
+
type = props.type,
|
|
66
|
+
name = props.name,
|
|
67
|
+
disabled = props.disabled,
|
|
68
|
+
getContainer = props.getContainer,
|
|
69
|
+
layout = props.layout,
|
|
70
|
+
_props$className = props.className,
|
|
71
|
+
className = _props$className === void 0 ? "" : _props$className,
|
|
72
|
+
_props$btnClick = props.btnClick,
|
|
73
|
+
btnClick = _props$btnClick === void 0 ? function () {} : _props$btnClick;
|
|
74
|
+
var inputRef = (0, _react.useRef)();
|
|
75
|
+
|
|
76
|
+
var _useState = (0, _react.useState)(false),
|
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
78
|
+
hasError = _useState2[0],
|
|
79
|
+
setHasError = _useState2[1];
|
|
80
|
+
|
|
81
|
+
var _useState3 = (0, _react.useState)(false),
|
|
82
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
83
|
+
hasActive = _useState4[0],
|
|
84
|
+
setHasActive = _useState4[1];
|
|
85
|
+
|
|
86
|
+
var _useState5 = (0, _react.useState)('获取验证码'),
|
|
87
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
88
|
+
btn_info = _useState6[0],
|
|
89
|
+
setBtn_info = _useState6[1];
|
|
90
|
+
|
|
91
|
+
var _useState7 = (0, _react.useState)(true),
|
|
92
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
93
|
+
btnCanClick = _useState8[0],
|
|
94
|
+
setBtnCanClick = _useState8[1];
|
|
95
|
+
|
|
96
|
+
var _useState9 = (0, _react.useState)(''),
|
|
97
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
98
|
+
tip = _useState10[0],
|
|
99
|
+
setTip = _useState10[1];
|
|
100
|
+
|
|
101
|
+
var _useState11 = (0, _react.useState)(props.value || ''),
|
|
102
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
103
|
+
value = _useState12[0],
|
|
104
|
+
setValue = _useState12[1];
|
|
105
|
+
|
|
106
|
+
(0, _react.useEffect)(function () {
|
|
107
|
+
setValue(props.value);
|
|
108
|
+
}, [props.value]);
|
|
109
|
+
|
|
110
|
+
var _verifing = function verifing() {
|
|
111
|
+
var value = inputRef.current && inputRef.current.value;
|
|
112
|
+
if (!verifies || !verifies.length) return [];
|
|
113
|
+
if (!require && !value) return [];
|
|
114
|
+
var errors = [];
|
|
115
|
+
|
|
116
|
+
for (var i = 0; i < verifies.length; i++) {
|
|
117
|
+
var _verifies$i = verifies[i],
|
|
118
|
+
test = _verifies$i.test,
|
|
119
|
+
_tip = _verifies$i.tip;
|
|
120
|
+
|
|
121
|
+
if (!value.match(test)) {
|
|
122
|
+
errors.push({
|
|
123
|
+
name: name,
|
|
124
|
+
tip: _tip
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return errors;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var onInputFocusHandler = function onInputFocusHandler() {
|
|
133
|
+
setHasActive(true);
|
|
134
|
+
inputRef.current.setSelectionRange(9999999, 9999999);
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
var onBlurHandler = function onBlurHandler() {
|
|
138
|
+
setHasActive(false);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
var onChangeHandler = function onChangeHandler() {
|
|
142
|
+
var value = inputRef.current && inputRef.current.value;
|
|
143
|
+
onChange && onChange(value);
|
|
144
|
+
setValue(value);
|
|
145
|
+
|
|
146
|
+
var errors = _verifing();
|
|
147
|
+
|
|
148
|
+
if (errors.length) {
|
|
149
|
+
setHasError(true);
|
|
150
|
+
setTip(errors[0].tip);
|
|
151
|
+
} else {
|
|
152
|
+
setHasError(false);
|
|
153
|
+
setTip('');
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
var HandlerCode = function HandlerCode() {
|
|
158
|
+
var errors = _verifing();
|
|
159
|
+
|
|
160
|
+
if (errors.length) return;
|
|
161
|
+
if (!btnCanClick || hasError) return;
|
|
162
|
+
btnClick && btnClick();
|
|
163
|
+
var time = 60;
|
|
164
|
+
setBtn_info("".concat(time, "s\u91CD\u65B0\u53D1\u9001"));
|
|
165
|
+
setBtnCanClick(false);
|
|
166
|
+
var timer = setInterval(function () {
|
|
167
|
+
if (time === 0) {
|
|
168
|
+
clearInterval(timer);
|
|
169
|
+
setBtn_info('获取验证码');
|
|
170
|
+
setBtnCanClick(true);
|
|
171
|
+
} else {
|
|
172
|
+
setBtn_info("".concat(time, "s\u91CD\u65B0\u53D1\u9001"));
|
|
173
|
+
time--;
|
|
174
|
+
}
|
|
175
|
+
}, 1000);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
179
|
+
return {
|
|
180
|
+
'verifing': function verifing() {
|
|
181
|
+
var errors = _verifing();
|
|
182
|
+
|
|
183
|
+
if (errors.length) {
|
|
184
|
+
setHasError(true);
|
|
185
|
+
setTip(errors[0].tip);
|
|
186
|
+
inputRef.current.focus();
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return errors;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
});
|
|
193
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
|
+
className: (0, _classnames["default"])(preCls, _defineProperty({}, "".concat(preCls, "-row"), layout === 'row'), className)
|
|
195
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
|
+
className: (0, _classnames["default"])("".concat(preCls, "__label"))
|
|
197
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
198
|
+
className: (0, _classnames["default"])("".concat(preCls, "__label-text"))
|
|
199
|
+
}, label), require && /*#__PURE__*/_react["default"].createElement("span", {
|
|
200
|
+
className: (0, _classnames["default"])("".concat(preCls, "__label-require"))
|
|
201
|
+
}, "*")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
202
|
+
className: (0, _classnames["default"])("".concat(preCls, "__border"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(preCls, "__border--error"), hasError), _defineProperty(_classNames2, "".concat(preCls, "__border--active"), hasActive), _defineProperty(_classNames2, "".concat(preCls, "__border--disabled"), disabled), _classNames2))
|
|
203
|
+
}, /*#__PURE__*/_react["default"].createElement(_errorTip["default"], {
|
|
204
|
+
placement: 'topLeft',
|
|
205
|
+
destroyTooltipOnHide: true,
|
|
206
|
+
visible: (hasActive || hasError) && tip,
|
|
207
|
+
overlay: /*#__PURE__*/_react["default"].createElement(OverlayInner, {
|
|
208
|
+
hasActive: hasActive,
|
|
209
|
+
hasError: hasError,
|
|
210
|
+
tip: tip
|
|
211
|
+
}),
|
|
212
|
+
getTooltipContainer: getContainer
|
|
213
|
+
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
214
|
+
ref: inputRef,
|
|
215
|
+
type: type,
|
|
216
|
+
disabled: disabled,
|
|
217
|
+
className: (0, _classnames["default"])("".concat(preCls, "__input")),
|
|
218
|
+
value: value,
|
|
219
|
+
placeholder: placeholder,
|
|
220
|
+
onFocus: onInputFocusHandler,
|
|
221
|
+
onBlur: onBlurHandler,
|
|
222
|
+
onChange: onChangeHandler,
|
|
223
|
+
autoComplete: "off"
|
|
224
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
225
|
+
className: (0, _classnames["default"])("".concat(preCls, "__btn"), _defineProperty({}, "".concat(preCls, "__btn--not"), !btnCanClick)),
|
|
226
|
+
onClick: HandlerCode
|
|
227
|
+
}, btn_info)));
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
exports["default"] = _default;
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.form-field-input__border--error {
|
|
27
|
-
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3)
|
|
28
|
-
border: 1px solid #f05e5e
|
|
27
|
+
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3);
|
|
28
|
+
border: 1px solid #f05e5e;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.form-field-input__border--active {
|
|
@@ -63,7 +63,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
63
63
|
});
|
|
64
64
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
65
|
className: "".concat(prefixCls, " ").concat(className)
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
|
+
}, !!label && /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
67
|
className: "".concat(prefixCls, "__label")
|
|
68
68
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
69
|
className: "".concat(prefixCls, "__label-text")
|
|
@@ -27,6 +27,8 @@ var _dropdown = _interopRequireDefault(require("./form-fields/dropdown"));
|
|
|
27
27
|
|
|
28
28
|
var _group = _interopRequireDefault(require("./form-fields/group"));
|
|
29
29
|
|
|
30
|
+
var _inputVerificationCode = _interopRequireDefault(require("./form-fields/input-verification-code"));
|
|
31
|
+
|
|
30
32
|
var _layout = require("./layout");
|
|
31
33
|
|
|
32
34
|
require("./index.css");
|
|
@@ -126,7 +128,8 @@ var FormFields = {
|
|
|
126
128
|
Textarea: _textarea["default"],
|
|
127
129
|
Radios: _radios["default"],
|
|
128
130
|
DropDown: _dropdown["default"],
|
|
129
|
-
GroupFields: _group["default"]
|
|
131
|
+
GroupFields: _group["default"],
|
|
132
|
+
VerificationInput: _inputVerificationCode["default"]
|
|
130
133
|
}; //@ts-ignore
|
|
131
134
|
|
|
132
135
|
Form.Fields = FormFields;
|
|
@@ -13,6 +13,8 @@ var _emptyImg = _interopRequireDefault(require("../../images/empty-img.svg"));
|
|
|
13
13
|
|
|
14
14
|
var _conditionRender = _interopRequireDefault(require("../../../../../condition-render"));
|
|
15
15
|
|
|
16
|
+
var _getLocale = require("../../../../../../utils/getLocale");
|
|
17
|
+
|
|
16
18
|
require("./index.css");
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -27,13 +29,13 @@ var Empty = function Empty(props) {
|
|
|
27
29
|
src: _emptyImg["default"]
|
|
28
30
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
29
31
|
className: (0, _classnames["default"])("".concat(preCls, "__empty-text"))
|
|
30
|
-
},
|
|
32
|
+
}, (0, _getLocale.getLocale)('Menu_Title_NoNews')), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
31
33
|
condition: tabPath !== null
|
|
32
34
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
33
35
|
target: "_blank",
|
|
34
36
|
href: tabPath,
|
|
35
37
|
className: (0, _classnames["default"])("".concat(preCls, "__empty-all"))
|
|
36
|
-
},
|
|
38
|
+
}, (0, _getLocale.getLocale)('Menu_Title_ViewNews'))));
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
var _default = Empty;
|
|
@@ -114,7 +114,7 @@ var UserMessage = function UserMessage(props) {
|
|
|
114
114
|
})), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
|
|
115
115
|
tab: /*#__PURE__*/_react["default"].createElement(_tabTitle["default"], {
|
|
116
116
|
data: getData("messageIndicator") - getData("mLeaveandComment"),
|
|
117
|
-
title:
|
|
117
|
+
title: (0, _getLocale.getLocale)('Menu_Title_Notice'),
|
|
118
118
|
tab: "informs"
|
|
119
119
|
}),
|
|
120
120
|
key: "informs"
|
|
@@ -29,6 +29,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
|
|
32
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
|
|
32
34
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
33
35
|
|
|
34
36
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -249,6 +251,7 @@ var _default = function _default(props) {
|
|
|
249
251
|
return setRowSelected([]);
|
|
250
252
|
}
|
|
251
253
|
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Clearselected')))), !!total && /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
|
|
254
|
+
className: (0, _classnames["default"])(_defineProperty({}, "".concat(preCls, "__pagination-only-one"), pageSize > total)),
|
|
252
255
|
pageSize: pageSize,
|
|
253
256
|
total: total,
|
|
254
257
|
current: pageNum,
|