登录样式优化

This commit is contained in:
禺狨 2023-03-09 15:27:37 +08:00
parent 13c8f65db8
commit 7cc49cfe21
4 changed files with 14 additions and 19 deletions

View File

@ -62,19 +62,12 @@ const items = [
), ),
]; ];
const rootSubmenuKeys = ["3", "4", "5", "6", "7", "8"];
export const LeftMenu: React.FC = () => { export const LeftMenu: React.FC = () => {
//展开的subMenu //展开的subMenu
const [openKeys, setOpenKeys] = useState(["1"]); const [openKeys, setOpenKeys] = useState(["1"]);
//点击subMenu的回调函数 //点击subMenu的回调函数
const onOpenChange = (keys: any) => { const onOpenChange = (keys: any) => {
const latestOpenKey = keys.find((key: any) => openKeys.indexOf(key) === -1); setOpenKeys(keys);
if (rootSubmenuKeys.indexOf(latestOpenKey) === -1) {
setOpenKeys(keys);
} else {
setOpenKeys(latestOpenKey ? [latestOpenKey] : []);
}
}; };
//路由跳转的函数 //路由跳转的函数
const navigate = useNavigate(); const navigate = useNavigate();

View File

@ -64,3 +64,5 @@
} }
} }

View File

@ -24,11 +24,9 @@ export const Login: React.FC = () => {
const [captcha_val, setCaptcha_val] = useState<string>(""); const [captcha_val, setCaptcha_val] = useState<string>("");
const [captcha_key, setCaptcha_key] = useState<string>(""); const [captcha_key, setCaptcha_key] = useState<string>("");
const fetchData = () => { const fetchData = () => {
setLoading(true);
system.getImageCaptcha().then((res: any) => { system.getImageCaptcha().then((res: any) => {
setImage(res.data.image); setImage(res.data.image);
setCaptcha_key(res.data.key); setCaptcha_key(res.data.key);
setLoading(false);
}); });
}; };
@ -94,7 +92,7 @@ export const Login: React.FC = () => {
</div> </div>
<div className={styles["right-box"]}> <div className={styles["right-box"]}>
<div className={styles["title"]}></div> <div className={styles["title"]}></div>
<div className="d-flex mt-50"> <div className="login-box d-flex mt-50">
<Input <Input
value={email} value={email}
onChange={(e) => { onChange={(e) => {
@ -104,7 +102,7 @@ export const Login: React.FC = () => {
placeholder="请输入管理员邮箱账号" placeholder="请输入管理员邮箱账号"
/> />
</div> </div>
<div className="d-flex mt-50"> <div className="login-box d-flex mt-50">
<Input.Password <Input.Password
value={password} value={password}
onChange={(e) => { onChange={(e) => {
@ -130,7 +128,7 @@ export const Login: React.FC = () => {
alt="" alt=""
/> />
</div> </div>
<div className="d-flex mt-50"> <div className="login-box d-flex mt-50">
<Button <Button
style={{ width: 400, height: 54 }} style={{ width: 400, height: 54 }}
type="primary" type="primary"

View File

@ -1,8 +1,10 @@
.ant-btn { .login-box {
font-size: 18px !important; .ant-btn {
font-weight: 600 !important; font-size: 18px !important;
} font-weight: 600 !important;
}
.ant-input { .ant-input {
font-size: 18px !important; font-size: 18px !important;
}
} }