@titaui/pc 1.8.7 → 1.8.8
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/change-okr-modal/Item.js +1 -5
- package/lib/components/change-okr-modal/constant.js +1 -6
- package/lib/components/dialog/index.css +1 -1
- package/lib/components/dynamic/my-team/index.js +1 -1
- package/lib/components/form/form-fields/duties/index.js +2 -1
- package/lib/components/form/form-fields/input-verification-code/index.js +18 -15
- package/lib/components/form/form-fields/password/index.css +18 -0
- package/lib/components/form/form-fields/password/index.js +33 -20
- package/lib/components/form/index.js +4 -1
- package/lib/components/menus/components/drag-resize/index.js +3 -5
- package/lib/components/menus/export-modules/appraisal-menus/index.js +1 -6
- package/lib/components/menus/export-modules/manage-menus/index.js +1 -5
- package/lib/components/menus/export-modules/okr-menus/index.js +2 -5
- package/lib/components/nav-top/components/user-message/components/remind/index.js +3 -1
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +2 -2
- package/lib/components/nav-top/components/user-message/msg/index.css +4 -0
- package/lib/components/nav-top/components/version/index.js +3 -3
- package/lib/components/okr-detail/okr-list/empty/index.js +1 -1
- package/lib/components/pagination/pagination.js +2 -5
- package/lib/components/period-selector/common.js +1 -6
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +1 -3
- package/lib/components/status-time/index.js +1 -1
- package/lib/components/upload-photo-modal/constant.js +2 -2
- package/lib/components/upload-photo-modal/index.css +1 -2
- package/lib/components/upload-photo-modal/index.js +54 -77
- package/lib/components/user-selector/request-apis.js +1 -1
- package/lib/pages/like-ranking/index.js +2 -2
- package/lib/pages/personal-info/components/base-info/index.css +31 -3
- package/lib/pages/personal-info/components/base-info/index.js +13 -5
- package/lib/pages/personal-info/components/{edit-info → edit-base-info}/index.css +1 -1
- package/lib/pages/personal-info/components/{edit-info → edit-base-info}/index.js +3 -4
- package/lib/pages/personal-info/components/person-photo/index.css +18 -5
- package/lib/pages/personal-info/components/person-photo/index.js +18 -3
- package/lib/utils/getLocale.js +7 -2
- package/package.json +1 -1
- package/src/components/change-okr-modal/Item.tsx +1 -4
- package/src/components/change-okr-modal/constant.ts +1 -5
- package/src/components/dialog/index.scss +1 -1
- package/src/components/dynamic/my-team/index.tsx +1 -1
- package/src/components/form/form-fields/duties/index.tsx +1 -1
- package/src/components/form/form-fields/input-verification-code/index.tsx +100 -70
- package/src/components/form/form-fields/password/index.scss +20 -4
- package/src/components/form/form-fields/password/index.tsx +73 -51
- package/src/components/form/index.tsx +3 -1
- package/src/components/menus/components/drag-resize/index.tsx +1 -3
- package/src/components/menus/export-modules/appraisal-menus/index.tsx +1 -5
- package/src/components/menus/export-modules/manage-menus/index.tsx +1 -4
- package/src/components/menus/export-modules/okr-menus/index.tsx +1 -4
- package/src/components/nav-top/components/user-message/components/remind/index.tsx +2 -1
- package/src/components/nav-top/components/user-message/components/remind/remind-item.tsx +2 -2
- package/src/components/nav-top/components/user-message/msg/index.scss +3 -0
- package/src/components/nav-top/components/version/index.tsx +1 -3
- package/src/components/okr-detail/okr-list/empty/index.js +1 -1
- package/src/components/pagination/pagination.tsx +1 -4
- package/src/components/period-selector/common.ts +1 -5
- package/src/components/publish-dynamic-modal/publish-dynamic-modal.tsx +2 -4
- package/src/components/status-time/index.tsx +2 -2
- package/src/components/upload-photo-modal/constant.ts +2 -2
- package/src/components/upload-photo-modal/index.scss +1 -2
- package/src/components/upload-photo-modal/index.tsx +42 -57
- package/src/components/user-selector/export-modules/duties-selector/index.tsx +1 -1
- package/src/components/user-selector/request-apis.js +1 -1
- package/src/pages/like-ranking/index.tsx +2 -2
- package/src/pages/personal-info/components/base-info/index.scss +26 -3
- package/src/pages/personal-info/components/base-info/index.tsx +12 -3
- package/src/pages/personal-info/components/{edit-info → edit-base-info}/index.scss +1 -1
- package/src/pages/personal-info/components/{edit-info → edit-base-info}/index.tsx +2 -4
- package/src/pages/personal-info/components/person-photo/index.scss +17 -5
- package/src/pages/personal-info/components/person-photo/index.tsx +12 -4
- package/src/utils/getLocale.ts +6 -0
- package/lib/pages/personal-info/components/edit-info/input/index.css +0 -89
- package/lib/pages/personal-info/components/edit-info/input/index.js +0 -199
- package/src/pages/personal-info/components/edit-info/input/index.scss +0 -82
- package/src/pages/personal-info/components/edit-info/input/index.tsx +0 -145
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
useRef,
|
|
4
|
+
useEffect,
|
|
5
|
+
forwardRef,
|
|
6
|
+
useImperativeHandle,
|
|
7
|
+
} from "react";
|
|
8
|
+
import classNames from "classnames";
|
|
9
|
+
import ToolTip from "../../../tooltip/error-tip";
|
|
10
|
+
import "./index.scss";
|
|
5
11
|
|
|
6
|
-
const preCls =
|
|
12
|
+
const preCls = "verification-code-input";
|
|
7
13
|
|
|
8
14
|
interface verify {
|
|
9
15
|
tip: string;
|
|
@@ -20,9 +26,10 @@ interface Props {
|
|
|
20
26
|
name: string;
|
|
21
27
|
getContainer?: Function;
|
|
22
28
|
disabled?: boolean;
|
|
23
|
-
layout?:
|
|
29
|
+
layout?: "clomn" | "row";
|
|
24
30
|
btnClick?: Function;
|
|
25
31
|
className?: string;
|
|
32
|
+
beforeSend?: Function;
|
|
26
33
|
}
|
|
27
34
|
interface Error {
|
|
28
35
|
name: string;
|
|
@@ -30,11 +37,11 @@ interface Error {
|
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
const OverlayInner = ({ hasError, hasActive, tip }) => {
|
|
33
|
-
if (hasActive) return <span style={{
|
|
34
|
-
if (hasError) return <span style={{
|
|
40
|
+
if (hasActive) return <span style={{ color: "#3F4755" }}>{tip}</span>;
|
|
41
|
+
if (hasError) return <span style={{ color: "#F05E5E" }}>{tip}</span>;
|
|
35
42
|
|
|
36
43
|
return <span />;
|
|
37
|
-
}
|
|
44
|
+
};
|
|
38
45
|
|
|
39
46
|
export default forwardRef((props: Props, ref) => {
|
|
40
47
|
const {
|
|
@@ -48,21 +55,22 @@ export default forwardRef((props: Props, ref) => {
|
|
|
48
55
|
disabled,
|
|
49
56
|
getContainer,
|
|
50
57
|
layout,
|
|
51
|
-
className="",
|
|
52
|
-
btnClick=()=>{},
|
|
58
|
+
className = "",
|
|
59
|
+
btnClick = () => {},
|
|
60
|
+
beforeSend,
|
|
53
61
|
} = props;
|
|
54
62
|
|
|
55
63
|
const inputRef = useRef<any>();
|
|
56
64
|
const [hasError, setHasError] = useState<boolean>(false);
|
|
57
65
|
const [hasActive, setHasActive] = useState<boolean>(false);
|
|
58
|
-
const [btn_info, setBtn_info] = useState<any>(
|
|
59
|
-
const [btnCanClick, setBtnCanClick] = useState<any>(true)
|
|
60
|
-
const [tip, setTip] = useState<string>(
|
|
61
|
-
const [value, setValue] = useState<string>(props.value ||
|
|
66
|
+
const [btn_info, setBtn_info] = useState<any>("获取验证码");
|
|
67
|
+
const [btnCanClick, setBtnCanClick] = useState<any>(true);
|
|
68
|
+
const [tip, setTip] = useState<string>("");
|
|
69
|
+
const [value, setValue] = useState<string>(props.value || "");
|
|
62
70
|
|
|
63
71
|
useEffect(() => {
|
|
64
72
|
setValue(props.value);
|
|
65
|
-
}, [props.value])
|
|
73
|
+
}, [props.value]);
|
|
66
74
|
|
|
67
75
|
const verifing = (): Error[] => {
|
|
68
76
|
const value = inputRef.current && inputRef.current.value;
|
|
@@ -76,16 +84,16 @@ export default forwardRef((props: Props, ref) => {
|
|
|
76
84
|
}
|
|
77
85
|
}
|
|
78
86
|
return errors;
|
|
79
|
-
}
|
|
87
|
+
};
|
|
80
88
|
|
|
81
89
|
const onInputFocusHandler = () => {
|
|
82
90
|
setHasActive(true);
|
|
83
91
|
inputRef.current.setSelectionRange(9999999, 9999999);
|
|
84
|
-
}
|
|
92
|
+
};
|
|
85
93
|
|
|
86
94
|
const onBlurHandler = () => {
|
|
87
95
|
setHasActive(false);
|
|
88
|
-
}
|
|
96
|
+
};
|
|
89
97
|
|
|
90
98
|
const onChangeHandler = () => {
|
|
91
99
|
const value = inputRef.current && inputRef.current.value;
|
|
@@ -97,32 +105,35 @@ export default forwardRef((props: Props, ref) => {
|
|
|
97
105
|
setTip(errors[0].tip);
|
|
98
106
|
} else {
|
|
99
107
|
setHasError(false);
|
|
100
|
-
setTip(
|
|
108
|
+
setTip("");
|
|
101
109
|
}
|
|
102
|
-
}
|
|
110
|
+
};
|
|
103
111
|
|
|
104
|
-
const HandlerCode = () =>{
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
const HandlerCode = () => {
|
|
113
|
+
if (beforeSend) {
|
|
114
|
+
const result = beforeSend();
|
|
115
|
+
if (!result) return;
|
|
116
|
+
}
|
|
117
|
+
if (!btnCanClick) return;
|
|
118
|
+
|
|
119
|
+
btnClick && btnClick();
|
|
120
|
+
let time = 60;
|
|
121
|
+
setBtn_info(`${time}s重新发送`);
|
|
122
|
+
setBtnCanClick(false);
|
|
112
123
|
let timer = setInterval(() => {
|
|
113
124
|
if (time === 0) {
|
|
114
|
-
clearInterval(timer)
|
|
115
|
-
setBtn_info(
|
|
116
|
-
setBtnCanClick(true)
|
|
125
|
+
clearInterval(timer);
|
|
126
|
+
setBtn_info("获取验证码");
|
|
127
|
+
setBtnCanClick(true);
|
|
117
128
|
} else {
|
|
118
|
-
setBtn_info(`${time}s重新发送`)
|
|
129
|
+
setBtn_info(`${time}s重新发送`);
|
|
119
130
|
time--;
|
|
120
131
|
}
|
|
121
132
|
}, 1000);
|
|
122
|
-
}
|
|
133
|
+
};
|
|
123
134
|
|
|
124
135
|
useImperativeHandle(ref, () => ({
|
|
125
|
-
|
|
136
|
+
verifing: (): Error[] => {
|
|
126
137
|
const errors = verifing();
|
|
127
138
|
if (errors.length) {
|
|
128
139
|
setHasError(true);
|
|
@@ -130,42 +141,61 @@ export default forwardRef((props: Props, ref) => {
|
|
|
130
141
|
inputRef.current.focus();
|
|
131
142
|
}
|
|
132
143
|
return errors;
|
|
133
|
-
}
|
|
134
|
-
}))
|
|
144
|
+
},
|
|
145
|
+
}));
|
|
135
146
|
|
|
136
|
-
return
|
|
137
|
-
<div
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
return (
|
|
148
|
+
<div
|
|
149
|
+
className={classNames(
|
|
150
|
+
preCls,
|
|
151
|
+
{ [`${preCls}-row`]: layout === "row" },
|
|
152
|
+
className
|
|
153
|
+
)}
|
|
154
|
+
>
|
|
155
|
+
<div className={classNames(`${preCls}__label`)}>
|
|
156
|
+
<span className={classNames(`${preCls}__label-text`)}>{label}</span>
|
|
157
|
+
{require && (
|
|
158
|
+
<span className={classNames(`${preCls}__label-require`)}>*</span>
|
|
159
|
+
)}
|
|
160
|
+
</div>
|
|
161
|
+
<div
|
|
162
|
+
className={classNames(`${preCls}__border`, {
|
|
163
|
+
[`${preCls}__border--error`]: hasError,
|
|
164
|
+
[`${preCls}__border--active`]: hasActive,
|
|
165
|
+
[`${preCls}__border--disabled`]: disabled,
|
|
166
|
+
})}
|
|
152
167
|
>
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
<ToolTip
|
|
169
|
+
placement={"topLeft"}
|
|
170
|
+
destroyTooltipOnHide={true}
|
|
171
|
+
visible={(hasActive || hasError) && tip}
|
|
172
|
+
overlay={
|
|
173
|
+
<OverlayInner hasActive={hasActive} hasError={hasError} tip={tip} />
|
|
174
|
+
}
|
|
175
|
+
getTooltipContainer={getContainer}
|
|
176
|
+
>
|
|
177
|
+
<input
|
|
178
|
+
ref={inputRef}
|
|
179
|
+
type={type}
|
|
180
|
+
disabled={disabled}
|
|
181
|
+
className={classNames(`${preCls}__input`)}
|
|
182
|
+
value={value}
|
|
183
|
+
placeholder={placeholder}
|
|
184
|
+
onFocus={onInputFocusHandler}
|
|
185
|
+
onBlur={onBlurHandler}
|
|
186
|
+
onChange={onChangeHandler}
|
|
187
|
+
autoComplete="off"
|
|
188
|
+
/>
|
|
189
|
+
</ToolTip>
|
|
190
|
+
<div
|
|
191
|
+
className={classNames(`${preCls}__btn`, {
|
|
192
|
+
[`${preCls}__btn--not`]: !btnCanClick,
|
|
193
|
+
})}
|
|
194
|
+
onClick={HandlerCode}
|
|
195
|
+
>
|
|
196
|
+
{btn_info}
|
|
197
|
+
</div>
|
|
168
198
|
</div>
|
|
169
199
|
</div>
|
|
170
|
-
|
|
171
|
-
})
|
|
200
|
+
);
|
|
201
|
+
});
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
.form-field-input {
|
|
2
|
+
&-row {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
.form-field-input__label {
|
|
6
|
+
margin-bottom: unset;
|
|
7
|
+
}
|
|
8
|
+
.form-field-input__border {
|
|
9
|
+
margin-left: 16px;
|
|
10
|
+
flex: 1;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
2
13
|
&__label {
|
|
3
14
|
height: 22px;
|
|
4
15
|
font-size: 14px;
|
|
5
16
|
margin-bottom: 5px;
|
|
6
|
-
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
17
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
18
|
+
sans-serif, PingFang SC, Microsoft YaHei;
|
|
7
19
|
font-weight: 400;
|
|
8
20
|
line-height: 22px;
|
|
9
21
|
|
|
@@ -22,10 +34,13 @@
|
|
|
22
34
|
transition: all 0.2s;
|
|
23
35
|
border: 1px solid #e9ecf0;
|
|
24
36
|
box-sizing: border-box;
|
|
37
|
+
.tu-icon-yincang {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
25
40
|
}
|
|
26
41
|
&__border--error {
|
|
27
|
-
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3)
|
|
28
|
-
border: 1px solid #f05e5e
|
|
42
|
+
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3);
|
|
43
|
+
border: 1px solid #f05e5e;
|
|
29
44
|
}
|
|
30
45
|
&__border--active {
|
|
31
46
|
box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3);
|
|
@@ -37,7 +52,8 @@
|
|
|
37
52
|
padding: 0;
|
|
38
53
|
width: calc(100% - 12px);
|
|
39
54
|
font-size: 14px;
|
|
40
|
-
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
55
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
|
|
56
|
+
sans-serif, PingFang SC, Microsoft YaHei;
|
|
41
57
|
font-weight: 400;
|
|
42
58
|
color: #3f4755;
|
|
43
59
|
height: 22px;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
useRef,
|
|
4
|
+
useEffect,
|
|
5
|
+
forwardRef,
|
|
6
|
+
useImperativeHandle,
|
|
7
|
+
} from "react";
|
|
8
|
+
import classNames from "classnames";
|
|
9
|
+
import ToolTip from "../../../tooltip/error-tip";
|
|
10
|
+
import "./index.scss";
|
|
5
11
|
|
|
6
|
-
const preCls =
|
|
12
|
+
const preCls = "form-field-input";
|
|
7
13
|
|
|
8
14
|
interface verify {
|
|
9
15
|
tip: string;
|
|
@@ -16,9 +22,9 @@ interface Props {
|
|
|
16
22
|
onChange?: Function;
|
|
17
23
|
value?: any;
|
|
18
24
|
require?: boolean;
|
|
19
|
-
type?: string;
|
|
20
25
|
name: string;
|
|
21
26
|
getContainer?: Function;
|
|
27
|
+
layout?: "clomn" | "row";
|
|
22
28
|
}
|
|
23
29
|
interface Error {
|
|
24
30
|
name: string;
|
|
@@ -26,10 +32,10 @@ interface Error {
|
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
const OverlayInner = ({ hasError, hasActive, tip }) => {
|
|
29
|
-
if (hasError) return <span style={{
|
|
30
|
-
if (hasActive) return <span style={{
|
|
35
|
+
if (hasError) return <span style={{ color: "#F05E5E" }}>{tip}</span>;
|
|
36
|
+
if (hasActive) return <span style={{ color: "#3F4755" }}>{tip}</span>;
|
|
31
37
|
return <span />;
|
|
32
|
-
}
|
|
38
|
+
};
|
|
33
39
|
|
|
34
40
|
export default forwardRef((props: Props, ref) => {
|
|
35
41
|
const {
|
|
@@ -38,20 +44,21 @@ export default forwardRef((props: Props, ref) => {
|
|
|
38
44
|
placeholder,
|
|
39
45
|
onChange,
|
|
40
46
|
require,
|
|
41
|
-
type,
|
|
42
47
|
name,
|
|
43
|
-
getContainer
|
|
48
|
+
getContainer,
|
|
49
|
+
layout,
|
|
44
50
|
} = props;
|
|
45
51
|
|
|
46
52
|
const inputRef = useRef<any>();
|
|
47
53
|
const [hasError, setHasError] = useState<boolean>(false);
|
|
48
54
|
const [hasActive, setHasActive] = useState<boolean>(false);
|
|
49
|
-
const [
|
|
50
|
-
const [
|
|
55
|
+
const [showPwd, setShowPwd] = useState(false);
|
|
56
|
+
const [tip, setTip] = useState<string>("");
|
|
57
|
+
const [value, setValue] = useState<string>(props.value || "");
|
|
51
58
|
|
|
52
59
|
useEffect(() => {
|
|
53
60
|
setValue(props.value);
|
|
54
|
-
}, [props.value])
|
|
61
|
+
}, [props.value]);
|
|
55
62
|
|
|
56
63
|
const verifing = (): Error[] => {
|
|
57
64
|
const value = inputRef.current && inputRef.current.value;
|
|
@@ -65,16 +72,16 @@ export default forwardRef((props: Props, ref) => {
|
|
|
65
72
|
}
|
|
66
73
|
}
|
|
67
74
|
return errors;
|
|
68
|
-
}
|
|
75
|
+
};
|
|
69
76
|
|
|
70
77
|
const onInputFocusHandler = () => {
|
|
71
78
|
setHasActive(true);
|
|
72
79
|
inputRef.current.setSelectionRange(9999999, 9999999);
|
|
73
|
-
}
|
|
80
|
+
};
|
|
74
81
|
|
|
75
82
|
const onBlurHandler = () => {
|
|
76
83
|
setHasActive(false);
|
|
77
|
-
}
|
|
84
|
+
};
|
|
78
85
|
|
|
79
86
|
const onChangeHandler = () => {
|
|
80
87
|
const value = inputRef.current && inputRef.current.value;
|
|
@@ -86,12 +93,12 @@ export default forwardRef((props: Props, ref) => {
|
|
|
86
93
|
setTip(errors[0].tip);
|
|
87
94
|
} else {
|
|
88
95
|
setHasError(false);
|
|
89
|
-
setTip(
|
|
96
|
+
setTip("");
|
|
90
97
|
}
|
|
91
|
-
}
|
|
98
|
+
};
|
|
92
99
|
|
|
93
100
|
useImperativeHandle(ref, () => ({
|
|
94
|
-
|
|
101
|
+
verifing: (): Error[] => {
|
|
95
102
|
const errors = verifing();
|
|
96
103
|
if (errors.length) {
|
|
97
104
|
setHasError(true);
|
|
@@ -99,37 +106,52 @@ export default forwardRef((props: Props, ref) => {
|
|
|
99
106
|
inputRef.current.focus();
|
|
100
107
|
}
|
|
101
108
|
return errors;
|
|
102
|
-
}
|
|
103
|
-
}))
|
|
109
|
+
},
|
|
110
|
+
}));
|
|
104
111
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
const onTypeChangeHandler = () => setShowPwd(!showPwd);
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<div
|
|
116
|
+
className={classNames(preCls, { [`${preCls}-row`]: layout === "row" })}
|
|
117
|
+
>
|
|
118
|
+
<div className={classNames(`${preCls}__label`)}>
|
|
119
|
+
<span className={classNames(`${preCls}__label-text`)}>{label}</span>
|
|
120
|
+
{require && (
|
|
121
|
+
<span className={classNames(`${preCls}__label-require`)}>*</span>
|
|
122
|
+
)}
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
className={classNames(`${preCls}__border`, {
|
|
126
|
+
[`${preCls}__border--error`]: hasError,
|
|
127
|
+
[`${preCls}__border--active`]: hasActive,
|
|
128
|
+
})}
|
|
120
129
|
>
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
<ToolTip
|
|
131
|
+
placement={"topLeft"}
|
|
132
|
+
destroyTooltipOnHide={true}
|
|
133
|
+
visible={(hasActive || hasError) && tip}
|
|
134
|
+
overlay={
|
|
135
|
+
<OverlayInner hasActive={hasActive} hasError={hasError} tip={tip} />
|
|
136
|
+
}
|
|
137
|
+
getTooltipContainer={getContainer}
|
|
138
|
+
>
|
|
139
|
+
<>
|
|
140
|
+
<input
|
|
141
|
+
ref={inputRef}
|
|
142
|
+
type={showPwd ? "text" : "password"}
|
|
143
|
+
className={classNames(`${preCls}__input`)}
|
|
144
|
+
value={value}
|
|
145
|
+
placeholder={placeholder}
|
|
146
|
+
onFocus={onInputFocusHandler}
|
|
147
|
+
onBlur={onBlurHandler}
|
|
148
|
+
onChange={onChangeHandler}
|
|
149
|
+
autoComplete="off"
|
|
150
|
+
/>
|
|
151
|
+
<span className="tu-icon-yincang" onClick={onTypeChangeHandler} />
|
|
152
|
+
</>
|
|
153
|
+
</ToolTip>
|
|
154
|
+
</div>
|
|
133
155
|
</div>
|
|
134
|
-
|
|
135
|
-
})
|
|
156
|
+
);
|
|
157
|
+
});
|
|
@@ -8,7 +8,8 @@ import _FormFieldTextarea from "./form-fields/textarea";
|
|
|
8
8
|
import _FormFieldRadios from "./form-fields/radios";
|
|
9
9
|
import _FormFieldDropDown from "./form-fields/dropdown";
|
|
10
10
|
import _FormFieldGroup from "./form-fields/group";
|
|
11
|
-
import _FormFieldVerificationCode from "./form-fields/input-verification-code"
|
|
11
|
+
import _FormFieldVerificationCode from "./form-fields/input-verification-code";
|
|
12
|
+
import _Password from './form-fields/password';
|
|
12
13
|
import { SingleLayout } from "./layout";
|
|
13
14
|
import "./index.scss";
|
|
14
15
|
|
|
@@ -102,6 +103,7 @@ const FormFields = {
|
|
|
102
103
|
DropDown:_FormFieldDropDown,
|
|
103
104
|
GroupFields:_FormFieldGroup,
|
|
104
105
|
VerificationInput:_FormFieldVerificationCode,
|
|
106
|
+
Password: _Password
|
|
105
107
|
};
|
|
106
108
|
//@ts-ignore
|
|
107
109
|
Form.Fields = FormFields
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useEffect } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import {
|
|
4
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
5
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
3
|
+
import { isEn } from '../../../../utils/getLocale';
|
|
6
4
|
import './index.scss';
|
|
7
5
|
|
|
8
6
|
const preCls = 'titaui-drag-resize';
|
|
@@ -8,11 +8,7 @@ import Scrollbar from '../../../scrollbar';
|
|
|
8
8
|
import AppraisalMenuData, { AppraisalMenusInt, defaultRefObject } from "./menus";
|
|
9
9
|
import MenuHighlight from './menu-highlight';
|
|
10
10
|
import preCls from "../../precls";
|
|
11
|
-
import { getLocale } from "../../../../utils/getLocale";
|
|
12
|
-
import { getBSGlobal } from "../../../../utils/bs-global";
|
|
13
|
-
|
|
14
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
15
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
11
|
+
import { getLocale, isEn } from "../../../../utils/getLocale";
|
|
16
12
|
|
|
17
13
|
import "../../index.scss";
|
|
18
14
|
import "./index.scss";
|
|
@@ -8,13 +8,10 @@ import {
|
|
|
8
8
|
} from "../../components/menu-tree/tree-node/index";
|
|
9
9
|
import { menus } from "./constant";
|
|
10
10
|
import { JudgeManageHighLightMenu } from "./handle-highlight";
|
|
11
|
-
import { getLocale } from "../../../../utils/getLocale";
|
|
11
|
+
import { getLocale, isEn } from "../../../../utils/getLocale";
|
|
12
12
|
import FlipCard, { flipRefIns } from "../../components/flip-menu-card";
|
|
13
|
-
import { getBSGlobal } from "../../../../utils/bs-global";
|
|
14
13
|
import Scrollbar from "../../../scrollbar";
|
|
15
14
|
|
|
16
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
17
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
18
15
|
import "./index.scss";
|
|
19
16
|
|
|
20
17
|
interface Props {
|
|
@@ -8,10 +8,7 @@ import SearchColeague from "../../components/search-colleague";
|
|
|
8
8
|
import OkrFrontMenus from './okr-front-menus';
|
|
9
9
|
import { FlipContext } from '../../context';
|
|
10
10
|
import preCls from "../../precls";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
14
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
11
|
+
import { isEn } from "../../../../utils/getLocale";
|
|
15
12
|
|
|
16
13
|
import "../../index.scss";
|
|
17
14
|
import "./index.scss";
|
|
@@ -7,6 +7,7 @@ import { getReminds } from "../../../../request.apis";
|
|
|
7
7
|
import Empty from "../empty";
|
|
8
8
|
import RemindItem from "./remind-item";
|
|
9
9
|
import Loading from "../../images/loading.gif";
|
|
10
|
+
import { getLocale } from "../../../../../../utils/getLocale";
|
|
10
11
|
import "./index.scss";
|
|
11
12
|
|
|
12
13
|
const preCls = "titaui-user-message-msg-remind";
|
|
@@ -65,7 +66,7 @@ const Remind = (props) => {
|
|
|
65
66
|
className={classNames(`${preCls}__footer-all`)}
|
|
66
67
|
onClick={() => deleteAll()}
|
|
67
68
|
>
|
|
68
|
-
|
|
69
|
+
{getLocale('Feed_Tab_IgnoreAll')}
|
|
69
70
|
</span>
|
|
70
71
|
</div>
|
|
71
72
|
</ConditionRender>
|
|
@@ -44,7 +44,7 @@ const Remind = (props) => {
|
|
|
44
44
|
className={classNames(`${preCls}__item-handle-ignore`)}
|
|
45
45
|
onClick={deleteOneTask}
|
|
46
46
|
>
|
|
47
|
-
|
|
47
|
+
{getLocale('Tasks_Menu_Ignore')}
|
|
48
48
|
</span>
|
|
49
49
|
<a
|
|
50
50
|
target="_blank"
|
|
@@ -55,7 +55,7 @@ const Remind = (props) => {
|
|
|
55
55
|
className={classNames(`${preCls}__item-handle-deal`)}
|
|
56
56
|
onClick={deleteOneTask}
|
|
57
57
|
>
|
|
58
|
-
|
|
58
|
+
{getLocale('Feed_Tab_ToDealWith')}
|
|
59
59
|
</span>
|
|
60
60
|
</a>
|
|
61
61
|
</div>
|
|
@@ -3,11 +3,9 @@ import { getBSGlobal } from "../../../../utils/bs-global";
|
|
|
3
3
|
import VersionChangeModal from "../../../version-change-modal";
|
|
4
4
|
import { Versions } from "../../../version-change-modal/constant";
|
|
5
5
|
import { getVersionTextMap } from "../../constant";
|
|
6
|
+
import { isEn } from "../../../../utils/getLocale";
|
|
6
7
|
import "./index.scss";
|
|
7
8
|
|
|
8
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
9
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
10
|
-
|
|
11
9
|
const prefix = "titaui-nav-top-version";
|
|
12
10
|
|
|
13
11
|
const Version: FC = () => {
|
|
@@ -22,7 +22,7 @@ export default ({ onCreateKr, canEditOkr, style={} }) => {
|
|
|
22
22
|
{canEditOkr &&
|
|
23
23
|
<div className={classNames(`${preCls}__action`)}>
|
|
24
24
|
<span className={classNames(`${preCls}__action-btn`)} onClick={() => onCreateKr()}>
|
|
25
|
-
<span
|
|
25
|
+
<span>{getLocale('OKR_MyO_Text_Addkeyr')}</span>
|
|
26
26
|
</span>
|
|
27
27
|
</div>
|
|
28
28
|
}
|
|
@@ -5,13 +5,10 @@ import Select from 'rc-select';
|
|
|
5
5
|
import 'rc-pagination/assets/index.css';
|
|
6
6
|
import './index.scss';
|
|
7
7
|
import './select.scss';
|
|
8
|
-
import {
|
|
8
|
+
import { isEn } from '../../utils/getLocale';
|
|
9
9
|
import zh_CN from './locale/zh_CN';
|
|
10
10
|
import en_US from './locale/en_US';
|
|
11
11
|
|
|
12
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
13
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
14
|
-
|
|
15
12
|
interface Props extends PaginationProps {
|
|
16
13
|
size?: 'md' | 'sm';
|
|
17
14
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { getLocale } from "../../utils/getLocale";
|
|
1
|
+
import { getLocale, isEn } from "../../utils/getLocale";
|
|
2
2
|
import { SelectedInterface, PeriodObj } from "./type";
|
|
3
3
|
import moment from "moment";
|
|
4
|
-
import { getBSGlobal } from "./helper";
|
|
5
|
-
|
|
6
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
7
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
8
4
|
|
|
9
5
|
export const getMonth = () => [
|
|
10
6
|
getLocale("Mod_Jan"),
|