aldehyde 0.2.309 → 0.2.312
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/controls/direct-file-view/drawer-file-view.d.ts +10 -0
- package/lib/controls/direct-file-view/drawer-file-view.d.ts.map +1 -0
- package/lib/controls/direct-file-view/drawer-file-view.js +27 -0
- package/lib/controls/direct-file-view/drawer-file-view.js.map +1 -0
- package/lib/controls/direct-file-view/index.d.ts +11 -0
- package/lib/controls/direct-file-view/index.d.ts.map +1 -0
- package/lib/controls/direct-file-view/index.js +76 -0
- package/lib/controls/direct-file-view/index.js.map +1 -0
- package/lib/controls/direct-upload/index.d.ts +14 -0
- package/lib/controls/direct-upload/index.d.ts.map +1 -0
- package/lib/controls/direct-upload/index.js +100 -0
- package/lib/controls/direct-upload/index.js.map +1 -0
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +4 -0
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +4 -0
- package/lib/controls/view-control.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/layout2/components/user-button.d.ts +4 -1
- package/lib/layout2/components/user-button.d.ts.map +1 -1
- package/lib/layout2/components/user-button.js +4 -5
- package/lib/layout2/components/user-button.js.map +1 -1
- package/lib/layout3/css/main.css +12 -1
- package/lib/layout3/css/sider.css +0 -3
- package/lib/layout3/css/tabs-layout.css +0 -11
- package/lib/layout3/header.js +1 -1
- package/lib/layout3/header.js.map +1 -1
- package/lib/layout3/main.d.ts.map +1 -1
- package/lib/layout3/main.js +0 -1
- package/lib/layout3/main.js.map +1 -1
- package/lib/layout3/page.d.ts.map +1 -1
- package/lib/layout3/page.js +2 -2
- package/lib/layout3/page.js.map +1 -1
- package/lib/layout3/sider.d.ts.map +1 -1
- package/lib/layout3/sider.js +0 -2
- package/lib/layout3/sider.js.map +1 -1
- package/lib/login2/login.d.ts +4 -0
- package/lib/login2/login.d.ts.map +1 -1
- package/lib/login2/login.js +14 -41
- package/lib/login2/login.js.map +1 -1
- package/lib/login3/img/login-bg.png +0 -0
- package/lib/login3/img/login-content-bg.png +0 -0
- package/lib/login3/img/logo.png +0 -0
- package/lib/login3/index.less +104 -0
- package/lib/login3/login-page.d.ts +9 -0
- package/lib/login3/login-page.d.ts.map +1 -0
- package/lib/login3/login-page.js +35 -0
- package/lib/login3/login-page.js.map +1 -0
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +12 -2
- package/lib/table/relation-table.js.map +1 -1
- package/lib/tmpl/control-type-supportor.d.ts.map +1 -1
- package/lib/tmpl/control-type-supportor.js +1 -0
- package/lib/tmpl/control-type-supportor.js.map +1 -1
- package/package.json +2 -1
- package/src/aldehyde/controls/direct-file-view/drawer-file-view.tsx +52 -0
- package/src/aldehyde/controls/direct-file-view/index.tsx +97 -0
- package/src/aldehyde/controls/direct-upload/index.tsx +127 -0
- package/src/aldehyde/controls/entry-control.tsx +47 -43
- package/src/aldehyde/controls/view-control.tsx +10 -6
- package/src/aldehyde/index.tsx +3 -1
- package/src/aldehyde/layout2/components/user-button.tsx +18 -15
- package/src/aldehyde/layout3/css/main.css +12 -1
- package/src/aldehyde/layout3/css/sider.css +0 -3
- package/src/aldehyde/layout3/css/tabs-layout.css +0 -11
- package/src/aldehyde/layout3/header.tsx +1 -1
- package/src/aldehyde/layout3/main.tsx +0 -1
- package/src/aldehyde/layout3/page.tsx +2 -1
- package/src/aldehyde/layout3/sider.tsx +0 -2
- package/src/aldehyde/login2/login.tsx +99 -100
- package/src/aldehyde/login3/img/login-bg.png +0 -0
- package/src/aldehyde/login3/img/login-content-bg.png +0 -0
- package/src/aldehyde/login3/img/logo.png +0 -0
- package/src/aldehyde/login3/index.less +104 -0
- package/src/aldehyde/login3/login-page.tsx +66 -0
- package/src/aldehyde/table/relation-table.tsx +10 -2
- package/src/aldehyde/tmpl/control-type-supportor.tsx +1 -0
- package/lib/lowcode-components/lowcode-view/component/screen-fit/index.less +0 -13
|
@@ -15,6 +15,7 @@ import EllipsisText from "./text/ellipsis-text";
|
|
|
15
15
|
import { ProgramConfig, useLocale } from "../index";
|
|
16
16
|
import FieldHistory from "./field-history";
|
|
17
17
|
import MultiFileView from "./file-view/multi-file-view";
|
|
18
|
+
import DirectFileView from "./direct-file-view";
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
// 暂时先这样, 异步组件国际化有问题
|
|
@@ -39,7 +40,7 @@ interface FieldViewControlProps {
|
|
|
39
40
|
fieldConfig: FieldConfig;
|
|
40
41
|
holderType: ControlHolderType;
|
|
41
42
|
style?: any;
|
|
42
|
-
dataCode?:string;
|
|
43
|
+
dataCode?: string;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
function renderControl(
|
|
@@ -68,12 +69,12 @@ function renderControl(
|
|
|
68
69
|
: translate("${无需输入}");
|
|
69
70
|
let disabled: boolean = fieldConfig.disabled;
|
|
70
71
|
|
|
71
|
-
let value = fieldValue || fieldValue==0
|
|
72
|
+
let value = fieldValue || fieldValue == 0
|
|
72
73
|
? fieldValue
|
|
73
74
|
: fieldConfig.defaultValue &&
|
|
74
75
|
!Units.isConfigDefaultValue(fieldConfig.defaultValue)
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
? fieldConfig.defaultValue
|
|
77
|
+
: "";
|
|
77
78
|
let viewOrEdit: ViewOrEdit = "view";
|
|
78
79
|
|
|
79
80
|
let controlProps = {
|
|
@@ -97,7 +98,7 @@ function renderControl(
|
|
|
97
98
|
</span>
|
|
98
99
|
);
|
|
99
100
|
|
|
100
|
-
if (value !=0 && (!value
|
|
101
|
+
if (value != 0 && (!value || value == "null" || value.toString().includes("@R@null"))) {
|
|
101
102
|
viewControl = <></>;
|
|
102
103
|
} else {
|
|
103
104
|
switch (itemType) {
|
|
@@ -170,7 +171,7 @@ function renderControl(
|
|
|
170
171
|
{value ? (
|
|
171
172
|
<Badge
|
|
172
173
|
color={value == "是" || value == 1 ? "green" : "red"}
|
|
173
|
-
text={translate("${" + (value==0 ?"否":value) + "}")}
|
|
174
|
+
text={translate("${" + (value == 0 ? "否" : value) + "}")}
|
|
174
175
|
/>
|
|
175
176
|
) : null}
|
|
176
177
|
</span>
|
|
@@ -214,6 +215,9 @@ function renderControl(
|
|
|
214
215
|
case "video":
|
|
215
216
|
viewControl = <FileView {...controlProps}></FileView>;
|
|
216
217
|
break;
|
|
218
|
+
case "direct-file":
|
|
219
|
+
viewControl = <DirectFileView {...controlProps} />;
|
|
220
|
+
break;
|
|
217
221
|
case "relfile":
|
|
218
222
|
//只是配置了,内部未做开发
|
|
219
223
|
viewControl = <MultiFileView {...controlProps}></MultiFileView>;
|
package/src/aldehyde/index.tsx
CHANGED
|
@@ -128,6 +128,7 @@ import LoginPage from "./login2/login-page";
|
|
|
128
128
|
|
|
129
129
|
// v3 Layout
|
|
130
130
|
import ContextPage3 from "./layout3/page";
|
|
131
|
+
import LoginPage3 from "./login3/login-page";
|
|
131
132
|
|
|
132
133
|
import LowcodeComponents from "./lowcode-components";
|
|
133
134
|
|
|
@@ -182,5 +183,6 @@ export {
|
|
|
182
183
|
ContextPage,
|
|
183
184
|
LoginPage,
|
|
184
185
|
LowcodeComponents,
|
|
185
|
-
ContextPage3
|
|
186
|
+
ContextPage3,
|
|
187
|
+
LoginPage3
|
|
186
188
|
};
|
|
@@ -17,7 +17,7 @@ import { NavLink, useNavigate } from "react-router-dom";
|
|
|
17
17
|
import ResetPassword from "../../layout/menu/reset-password";
|
|
18
18
|
import HCDataSource from "../../tmpl/hc-data-source";
|
|
19
19
|
import { useSessionStorageState } from 'ahooks';
|
|
20
|
-
import {KeepAliveTab} from "../../hooks/use-tabs";
|
|
20
|
+
import { KeepAliveTab } from "../../hooks/use-tabs";
|
|
21
21
|
import Units from "../../units";
|
|
22
22
|
|
|
23
23
|
type DropDownMenuType = {
|
|
@@ -27,9 +27,14 @@ type DropDownMenuType = {
|
|
|
27
27
|
show?: () => boolean;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
interface Props extends ButtonProps {
|
|
31
|
+
logoutUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const UserButton: React.FC<Props> = (props) => {
|
|
35
|
+
const { logoutUrl = "/login2" } = props;
|
|
31
36
|
// translate
|
|
32
|
-
const { translate,changeSiderCollapsed,getSiderCollapsed } = useLocale();
|
|
37
|
+
const { translate, changeSiderCollapsed, getSiderCollapsed } = useLocale();
|
|
33
38
|
const [keepAliveTabs, setKeepAliveTabs] = useSessionStorageState<KeepAliveTab[]>('keepAliveTabs', {
|
|
34
39
|
defaultValue: [],
|
|
35
40
|
});
|
|
@@ -45,7 +50,7 @@ const UserButton: React.FC<ButtonProps> = (props) => {
|
|
|
45
50
|
const userInfo: UserInfo = await Units.getUserInfo();
|
|
46
51
|
setUserConfig(userInfo);
|
|
47
52
|
};
|
|
48
|
-
useEffect(() => {}, [userConfig]);
|
|
53
|
+
useEffect(() => { }, [userConfig]);
|
|
49
54
|
|
|
50
55
|
// 上下文配置信息
|
|
51
56
|
const [globalContext, setGlobalContext] = useState<any[]>();
|
|
@@ -72,19 +77,17 @@ const UserButton: React.FC<ButtonProps> = (props) => {
|
|
|
72
77
|
const logout = async () => {
|
|
73
78
|
setKeepAliveTabs([]);
|
|
74
79
|
await HcserviceV3.logout2();
|
|
75
|
-
navigate(
|
|
80
|
+
navigate(logoutUrl);
|
|
76
81
|
};
|
|
77
82
|
|
|
78
83
|
// dropdown menu
|
|
79
|
-
const onClick: MenuProps["onClick"] = ({ key }) => {};
|
|
84
|
+
const onClick: MenuProps["onClick"] = ({ key }) => { };
|
|
80
85
|
const dropdownMenuList: DropDownMenuType[] = [
|
|
81
86
|
{
|
|
82
|
-
label: <NavLink to=
|
|
87
|
+
label: <NavLink to={logoutUrl}>{translate("${登录}")}</NavLink>,
|
|
83
88
|
key: "login",
|
|
84
89
|
icon: <LoginOutlined />,
|
|
85
|
-
show: () =>
|
|
86
|
-
return !isLogin;
|
|
87
|
-
},
|
|
90
|
+
show: () => !isLogin,
|
|
88
91
|
},
|
|
89
92
|
{
|
|
90
93
|
label: (
|
|
@@ -129,16 +132,16 @@ const UserButton: React.FC<ButtonProps> = (props) => {
|
|
|
129
132
|
show: () => {
|
|
130
133
|
return isLogin && userConfig.cleanCachable;
|
|
131
134
|
},
|
|
132
|
-
},{
|
|
135
|
+
}, {
|
|
133
136
|
label: (
|
|
134
|
-
|
|
135
|
-
{getSiderCollapsed()?translate("${显示侧边栏}"):translate("${隐藏侧边栏}")}
|
|
137
|
+
<span onClick={() => changeSiderCollapsed()}>
|
|
138
|
+
{getSiderCollapsed() ? translate("${显示侧边栏}") : translate("${隐藏侧边栏}")}
|
|
136
139
|
</span>
|
|
137
140
|
),
|
|
138
141
|
key: "collapseSider",
|
|
139
|
-
icon: <span>{getSiderCollapsed()? <MenuUnfoldOutlined />
|
|
142
|
+
icon: <span>{getSiderCollapsed() ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />}</span>,
|
|
140
143
|
show: () => {
|
|
141
|
-
return isLogin
|
|
144
|
+
return isLogin;
|
|
142
145
|
},
|
|
143
146
|
},
|
|
144
147
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.main{
|
|
1
|
+
.v3-main{
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 100%;
|
|
4
4
|
position: absolute;
|
|
@@ -15,4 +15,15 @@
|
|
|
15
15
|
-webkit-text-fill-color: transparent;
|
|
16
16
|
font-size: 20px;
|
|
17
17
|
}
|
|
18
|
+
.ant-drawer,.ant-modal-content {
|
|
19
|
+
.ant-drawer-content{
|
|
20
|
+
border: none !important;
|
|
21
|
+
}
|
|
22
|
+
.ant-card-head{
|
|
23
|
+
background: transparent !important;
|
|
24
|
+
}
|
|
25
|
+
.ant-layout{
|
|
26
|
+
background: #041B3B !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
}
|
|
@@ -28,14 +28,3 @@
|
|
|
28
28
|
background: transparent !important;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
.ant-drawer,.ant-modal-content {
|
|
32
|
-
.ant-drawer-content{
|
|
33
|
-
border: none !important;
|
|
34
|
-
}
|
|
35
|
-
.ant-card-head{
|
|
36
|
-
background: transparent !important;
|
|
37
|
-
}
|
|
38
|
-
.ant-layout{
|
|
39
|
-
background: #041B3B !important;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -151,7 +151,7 @@ const Header: React.FC<HeaderPropsType> = ({ systemName, menuList }) => {
|
|
|
151
151
|
color: "#009BFF",
|
|
152
152
|
}}
|
|
153
153
|
/>
|
|
154
|
-
<div className="header-user"><UserButton style={{ padding: 0, color: "#fff" }} /></div>
|
|
154
|
+
<div className="header-user"><UserButton logoutUrl="/login3" style={{ padding: 0, color: "#fff" }} /></div>
|
|
155
155
|
</Space>
|
|
156
156
|
</div>
|
|
157
157
|
</div>
|
|
@@ -46,9 +46,10 @@ const Page: React.FC<PagePropsType> = (props: PagePropsType) => {
|
|
|
46
46
|
<DocumentTitle title={documentTitle}>
|
|
47
47
|
<div
|
|
48
48
|
ref={pageRef}
|
|
49
|
-
className="main"
|
|
49
|
+
className="v3-main"
|
|
50
50
|
>
|
|
51
51
|
<ConfigProvider
|
|
52
|
+
getPopupContainer={() => pageRef.current}
|
|
52
53
|
theme={{
|
|
53
54
|
algorithm: [theme.darkAlgorithm],
|
|
54
55
|
token: { colorBgBase: "#041B3B" },
|
|
@@ -68,7 +68,6 @@ const Sider: React.FC<SiderPropsType> = ({ menuList, collapsed }) => {
|
|
|
68
68
|
width: "100%",
|
|
69
69
|
height: "100%",
|
|
70
70
|
display: "block",
|
|
71
|
-
textAlign: "center"
|
|
72
71
|
}}
|
|
73
72
|
>
|
|
74
73
|
{translate("${" + label + "}")}
|
|
@@ -88,7 +87,6 @@ const Sider: React.FC<SiderPropsType> = ({ menuList, collapsed }) => {
|
|
|
88
87
|
display: "block",
|
|
89
88
|
textOverflow: "ellipsis",
|
|
90
89
|
overflow: "hidden",
|
|
91
|
-
textAlign: "center"
|
|
92
90
|
}}
|
|
93
91
|
>
|
|
94
92
|
<Space size={"small"}>{Units.mapMenuIcon(id)}{translate("${" + label + "}")}</Space>
|
|
@@ -1,34 +1,44 @@
|
|
|
1
|
-
import {Button, Col, Form, Input, Row} from "antd";
|
|
1
|
+
import { Button, Col, Form, Input, Row } from "antd";
|
|
2
2
|
import React, { useEffect, useState } from "react";
|
|
3
3
|
import HCserviceV3 from "../tmpl/hcservice-v3";
|
|
4
4
|
import { useLocale } from "../locale/useLocale";
|
|
5
5
|
import { useParams } from "react-router-dom";
|
|
6
6
|
import Units from "../units";
|
|
7
|
-
import {SafetyCertificateOutlined} from "@ant-design/icons";
|
|
7
|
+
import { SafetyCertificateOutlined } from "@ant-design/icons";
|
|
8
8
|
import { useSessionStorageState } from 'ahooks';
|
|
9
|
-
import {KeepAliveTab} from "../hooks/use-tabs";
|
|
9
|
+
import { KeepAliveTab } from "../hooks/use-tabs";
|
|
10
|
+
|
|
10
11
|
type LoginPropType = {
|
|
11
12
|
onFinish?: (token: string) => void;
|
|
12
13
|
title?: any;
|
|
13
14
|
programCode?: string;
|
|
14
15
|
autoSaveUser?: boolean;
|
|
16
|
+
version?: string;
|
|
17
|
+
style?: { [key: string]: any };
|
|
15
18
|
};
|
|
16
19
|
|
|
17
20
|
type FormType = {
|
|
18
21
|
username: string;
|
|
19
22
|
password: string;
|
|
20
|
-
kaptchaText:string;
|
|
23
|
+
kaptchaText: string;
|
|
21
24
|
};
|
|
22
25
|
|
|
26
|
+
const defStyle = {
|
|
27
|
+
input: { borderRadius: "50px", background: "#EEF3FB" },
|
|
28
|
+
kaptcha: { borderRadius: "30px", background: "#EEF3FB" },
|
|
29
|
+
button: { shape: "round" }
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
const Login = (props: LoginPropType) => {
|
|
33
|
+
const { version = "v2", style = defStyle } = props;
|
|
24
34
|
// locale
|
|
25
35
|
const { translate } = useLocale();
|
|
26
36
|
const [keepAliveTabs, setKeepAliveTabs] = useSessionStorageState<KeepAliveTab[]>('keepAliveTabs', {
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
defaultValue: [],
|
|
38
|
+
});
|
|
29
39
|
|
|
30
40
|
useEffect(() => {
|
|
31
|
-
localStorage.setItem("version",
|
|
41
|
+
localStorage.setItem("version", version);
|
|
32
42
|
}, []);
|
|
33
43
|
|
|
34
44
|
const { programCode: routeProgramCode } = useParams();
|
|
@@ -36,17 +46,17 @@ const Login = (props: LoginPropType) => {
|
|
|
36
46
|
if (routeProgramCode === undefined) return;
|
|
37
47
|
Units.setProgramCode(routeProgramCode);
|
|
38
48
|
}, [routeProgramCode]);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
const [loading, setLoading] = useState<boolean>(false);
|
|
50
|
+
const [needKaptcha, setNeedKaptcha] = useState<boolean>(false);
|
|
51
|
+
const [kaptchaImg, setKaptchaImg] = useState<string>(null);
|
|
52
|
+
const [kaptchaToken, setKaptchaToken] = useState<string>(null);
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
// form
|
|
45
55
|
const [form] = Form.useForm<FormType>();
|
|
46
56
|
const submit = async () => {
|
|
47
|
-
|
|
57
|
+
setKeepAliveTabs([]);
|
|
48
58
|
try {
|
|
49
|
-
const { username, password,kaptchaText } = await form.validateFields();
|
|
59
|
+
const { username, password, kaptchaText } = await form.validateFields();
|
|
50
60
|
|
|
51
61
|
setLoading(true);
|
|
52
62
|
const { programCode, onFinish } = props;
|
|
@@ -56,16 +66,16 @@ const Login = (props: LoginPropType) => {
|
|
|
56
66
|
);
|
|
57
67
|
const res = await HCserviceV3.login(
|
|
58
68
|
{ username, password },
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
kaptchaToken,
|
|
70
|
+
kaptchaText,
|
|
61
71
|
pubkey,
|
|
62
72
|
programCode ? programCode : routeProgramCode
|
|
63
73
|
);
|
|
64
74
|
if (res.status === "success") {
|
|
65
75
|
onFinish(res.token);
|
|
66
|
-
}else if (res.status === "error") {
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
} else if (res.status === "error") {
|
|
77
|
+
setNeedKaptcha(true);
|
|
78
|
+
await getKaptchaToken();
|
|
69
79
|
}
|
|
70
80
|
setLoading(false);
|
|
71
81
|
} catch (err) {
|
|
@@ -73,31 +83,31 @@ const Login = (props: LoginPropType) => {
|
|
|
73
83
|
}
|
|
74
84
|
};
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
const handleKeyDown = (event) => {
|
|
87
|
+
//按下enter键,触发login事件
|
|
88
|
+
switch (event.keyCode) {
|
|
89
|
+
case 13:
|
|
90
|
+
submit();
|
|
91
|
+
break;
|
|
92
|
+
default:
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
86
96
|
|
|
87
|
-
|
|
97
|
+
const getKaptchaToken = async () => {
|
|
88
98
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
let res = await HCserviceV3.getKaptchaToken(routeProgramCode);
|
|
100
|
+
if (res) {
|
|
101
|
+
let kaptchaImg;
|
|
102
|
+
if (res.img && res.img.indexOf("data:") == 0) {
|
|
103
|
+
kaptchaImg = res.img;
|
|
104
|
+
} else {
|
|
105
|
+
kaptchaImg = `data:image/png;base64,${res.img}`;
|
|
106
|
+
}
|
|
107
|
+
setKaptchaImg(kaptchaImg);
|
|
108
|
+
setKaptchaToken(res.kaptchaToken);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
101
111
|
|
|
102
112
|
// button
|
|
103
113
|
return (
|
|
@@ -115,11 +125,10 @@ const Login = (props: LoginPropType) => {
|
|
|
115
125
|
<Input
|
|
116
126
|
placeholder={translate("请输入用户名")}
|
|
117
127
|
style={{
|
|
118
|
-
borderRadius: "50px",
|
|
119
|
-
background: "#EEF3FB",
|
|
120
128
|
height: "50px",
|
|
121
129
|
fontSize: "15px",
|
|
122
130
|
lineHeight: "15px",
|
|
131
|
+
...style.input
|
|
123
132
|
}}
|
|
124
133
|
/>
|
|
125
134
|
</Form.Item>
|
|
@@ -132,70 +141,59 @@ const Login = (props: LoginPropType) => {
|
|
|
132
141
|
placeholder={translate("请输入密码")}
|
|
133
142
|
onKeyDown={handleKeyDown}
|
|
134
143
|
style={{
|
|
135
|
-
borderRadius: "50px",
|
|
136
|
-
background: "#EEF3FB",
|
|
137
144
|
height: "50px",
|
|
138
145
|
fontSize: "15px",
|
|
139
146
|
lineHeight: "15px",
|
|
147
|
+
...style.input
|
|
140
148
|
}}
|
|
141
149
|
/>
|
|
142
150
|
</Form.Item>
|
|
143
151
|
{needKaptcha ? (
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
cursor: "pointer"
|
|
188
|
-
}}
|
|
189
|
-
// height={50}
|
|
190
|
-
width={110}
|
|
191
|
-
title={translate("${点击刷新}")}
|
|
192
|
-
onClick={getKaptchaToken}
|
|
193
|
-
src={kaptchaImg}
|
|
194
|
-
></img>
|
|
195
|
-
</Col>
|
|
196
|
-
</Row>
|
|
152
|
+
<Row gutter={8}>
|
|
153
|
+
<Col span={16}>
|
|
154
|
+
<Form.Item
|
|
155
|
+
name="kaptchaText"
|
|
156
|
+
rules={[
|
|
157
|
+
{
|
|
158
|
+
required: true,
|
|
159
|
+
message: translate("${请输入}${验证码}!"),
|
|
160
|
+
},
|
|
161
|
+
]}
|
|
162
|
+
>
|
|
163
|
+
<Input
|
|
164
|
+
style={{
|
|
165
|
+
height: "50px",
|
|
166
|
+
fontSize: "15px",
|
|
167
|
+
lineHeight: "15px",
|
|
168
|
+
...style.input
|
|
169
|
+
}}
|
|
170
|
+
onKeyDown={handleKeyDown}
|
|
171
|
+
prefix={
|
|
172
|
+
<SafetyCertificateOutlined className="site-form-item-icon" />
|
|
173
|
+
}
|
|
174
|
+
placeholder={translate("${验证码}")}
|
|
175
|
+
//onKeyDown={this.handleKeyDown}
|
|
176
|
+
/>
|
|
177
|
+
</Form.Item>
|
|
178
|
+
</Col>
|
|
179
|
+
<Col span={8}>
|
|
180
|
+
<img
|
|
181
|
+
style={{
|
|
182
|
+
height: "50px",
|
|
183
|
+
fontSize: "15px",
|
|
184
|
+
lineHeight: "15px",
|
|
185
|
+
cursor: "pointer",
|
|
186
|
+
width: "100%",
|
|
187
|
+
...style.kaptcha
|
|
188
|
+
}}
|
|
189
|
+
title={translate("${点击刷新}")}
|
|
190
|
+
onClick={getKaptchaToken}
|
|
191
|
+
src={kaptchaImg}
|
|
192
|
+
/>
|
|
193
|
+
</Col>
|
|
194
|
+
</Row>
|
|
197
195
|
) : (
|
|
198
|
-
|
|
196
|
+
""
|
|
199
197
|
)}
|
|
200
198
|
|
|
201
199
|
<Form.Item wrapperCol={{ span: 24 }}>
|
|
@@ -210,6 +208,7 @@ const Login = (props: LoginPropType) => {
|
|
|
210
208
|
fontSize: "15px",
|
|
211
209
|
lineHeight: "15px",
|
|
212
210
|
}}
|
|
211
|
+
{...style.button}
|
|
213
212
|
>
|
|
214
213
|
{translate("登录")}
|
|
215
214
|
</Button>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
.login-page {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
min-height: 640px;
|
|
5
|
+
position: relative;
|
|
6
|
+
background-size: 100% 100%;
|
|
7
|
+
background-repeat: no-repeat;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: row-reverse;
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
align-items: center;
|
|
12
|
+
|
|
13
|
+
.login-logo-img {
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 20%;
|
|
16
|
+
left: 5%;
|
|
17
|
+
z-index: 1;
|
|
18
|
+
width: 40%;
|
|
19
|
+
min-width: 600px;
|
|
20
|
+
max-width: 1000px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.login-content {
|
|
24
|
+
width: 500px;
|
|
25
|
+
background: linear-gradient(0deg, #FFFFFF 65%, #DFEDFF);
|
|
26
|
+
background-size: 100% 100%;
|
|
27
|
+
background-repeat: no-repeat;
|
|
28
|
+
margin-right: 5%;
|
|
29
|
+
z-index: 9;
|
|
30
|
+
|
|
31
|
+
.login-logo {
|
|
32
|
+
width: 100%;
|
|
33
|
+
padding: 0 40px;
|
|
34
|
+
|
|
35
|
+
.login-logo-text,
|
|
36
|
+
.login-logo-text-sub {
|
|
37
|
+
font-size: 28px;
|
|
38
|
+
padding: 12px 0 20px;
|
|
39
|
+
font-family: YouSheBiaoTiHei;
|
|
40
|
+
text-align: justify;
|
|
41
|
+
font-style: normal;
|
|
42
|
+
text-transform: none;
|
|
43
|
+
background-image: linear-gradient(180deg, #FFFFFF 0%, #90DEFF 100%);
|
|
44
|
+
/* 可以调整方向和颜色 */
|
|
45
|
+
/* 2. 关键: 将背景裁剪到文字形状 */
|
|
46
|
+
-webkit-background-clip: text;
|
|
47
|
+
/* 对于 Webkit 内核浏览器 (如 Safari, 老版Chrome) */
|
|
48
|
+
background-clip: text;
|
|
49
|
+
/* 标准属性 */
|
|
50
|
+
/* 3. 关键: 将文字颜色设置为透明,以显示背景渐变 */
|
|
51
|
+
-webkit-text-fill-color: transparent;
|
|
52
|
+
/* 对于 Webkit 内核浏览器 */
|
|
53
|
+
color: transparent;
|
|
54
|
+
/* 标准属性,但注意某些环境下可能需 -webkit-text-fill-color 配合 */
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.login-logo-text-sub {
|
|
58
|
+
font-size: 32px;
|
|
59
|
+
padding-top: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.login-form {
|
|
64
|
+
padding: 40px;
|
|
65
|
+
min-height: 442px;
|
|
66
|
+
position: relative;
|
|
67
|
+
|
|
68
|
+
.ant-input::placeholder {
|
|
69
|
+
color: #9FCFF8;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ant-input-password-icon {
|
|
73
|
+
color: #ffffff;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// 解决输入框自动填充时背景颜色变白的问题
|
|
77
|
+
input:-webkit-autofill,
|
|
78
|
+
input:-webkit-autofill:hover,
|
|
79
|
+
input:-webkit-autofill:focus,
|
|
80
|
+
input:-webkit-autofill:active {
|
|
81
|
+
transition: all 5000s ease-in-out 0s;
|
|
82
|
+
transition-property: background-color, color;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.reset-password {
|
|
86
|
+
width: 100%;
|
|
87
|
+
text-align: center;
|
|
88
|
+
|
|
89
|
+
.ant-btn-variant-link {
|
|
90
|
+
color: #9FCFF8;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.login-copyright {
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
color: #ffffff;
|
|
98
|
+
position: absolute;
|
|
99
|
+
bottom: 40px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
}
|