优化代码

pull/59/head
awenes 1 year ago
parent 834cc3cc26
commit 32d5c5f50a

@ -47,7 +47,7 @@
"@ant-design/charts": "^1.4.2", "@ant-design/charts": "^1.4.2",
"@ant-design/icons": "^5.2.6", "@ant-design/icons": "^5.2.6",
"@ant-design/maps": "^1.0.7", "@ant-design/maps": "^1.0.7",
"@ant-design/pro-components": "^2.6.25", "@ant-design/pro-components": "^2.6.27",
"ahooks": "^3.7.8", "ahooks": "^3.7.8",
"antd": "^5.9.3", "antd": "^5.9.3",
"antd-img-crop": "^4.13.0", "antd-img-crop": "^4.13.0",

@ -28,11 +28,9 @@ import queryString from 'query-string';
import { flushSync } from 'react-dom'; import { flushSync } from 'react-dom';
import classnames from 'classnames'; import classnames from 'classnames';
import useStyle from './style'; import useStyle from './style';
import Banner from '@/components/Banner';
import PageLoading from '@/components/PageLoading'; import PageLoading from '@/components/PageLoading';
const prefixCls = 'login'; const prefixCls = 'login';
const showBanner = process.env.PREVIEW_ENV || process.env.NODE_ENV === 'development';
/** /**
* *
@ -152,14 +150,6 @@ const Login: React.FC = () => {
<link rel="icon" href={'/favicon.ico'} /> <link rel="icon" href={'/favicon.ico'} />
</Helmet> </Helmet>
<div className={classnames(`${prefixCls}`)}> <div className={classnames(`${prefixCls}`)}>
{showBanner && <Banner />}
<div
style={{
backgroundColor: 'white',
height: 'calc(100vh - 48px)',
border: '1px solid rgb(240, 240, 240)',
}}
>
<LoginFormPage <LoginFormPage
backgroundImageUrl={'/login-background.png'} backgroundImageUrl={'/login-background.png'}
logo={'/full-logo.svg'} logo={'/full-logo.svg'}
@ -262,7 +252,6 @@ const Login: React.FC = () => {
</div> </div>
</LoginFormPage> </LoginFormPage>
</div> </div>
</div>
</> </>
) : ( ) : (
<PageLoading /> <PageLoading />

@ -23,6 +23,9 @@ const useStyle = createStyles(({ token, prefixCls }, prefix) => {
return { return {
main: { main: {
[`${prefixClassName}`]: { [`${prefixClassName}`]: {
backgroundColor: 'white',
height: '100vh',
border: '1px solid rgb(240, 240, 240)',
[`${prefixClassName}-form-prefix-icon`]: { [`${prefixClassName}-form-prefix-icon`]: {
color: token.colorPrimary, color: token.colorPrimary,
fontSize: token.fontSize, fontSize: token.fontSize,

@ -48,7 +48,7 @@
"@ant-design/charts": "^1.4.2", "@ant-design/charts": "^1.4.2",
"@ant-design/icons": "^5.2.6", "@ant-design/icons": "^5.2.6",
"@ant-design/maps": "^1.0.7", "@ant-design/maps": "^1.0.7",
"@ant-design/pro-components": "^2.6.25", "@ant-design/pro-components": "^2.6.27",
"ahooks": "^3.7.8", "ahooks": "^3.7.8",
"antd": "^5.9.3", "antd": "^5.9.3",
"antd-img-crop": "^4.13.0", "antd-img-crop": "^4.13.0",

Loading…
Cancel
Save