自适应手机端

main
Ycc 9 months ago
parent e4093fcce7
commit 2d3d23e10f

@ -1,15 +1,14 @@
import { Outlet } from 'react-router-dom' import { Outlet } from "react-router-dom";
import { Layout, ConfigProvider, theme, Row, Col, App as AntApp } from 'antd' import { Layout, ConfigProvider, theme, Row, Col, App as AntApp } from "antd";
import 'antd/dist/reset.css' import "antd/dist/reset.css";
import AppLogo from '@/assets/logo-gh.png' import AppLogo from "@/assets/logo-gh.png";
import { useThemeContext } from '@/stores/ThemeContext' import { useThemeContext } from "@/stores/ThemeContext";
import { BUILD_VERSION, } from '@/config'; import { BUILD_VERSION } from "@/config";
const { Header, Content, Footer } = Layout const { Header, Content, Footer } = Layout;
function Standlone() { function Standlone() {
const { colorPrimary } = useThemeContext();
const { colorPrimary } = useThemeContext()
return ( return (
<ConfigProvider <ConfigProvider
@ -20,23 +19,19 @@ function Standlone() {
algorithm: theme.defaultAlgorithm, algorithm: theme.defaultAlgorithm,
}}> }}>
<AntApp> <AntApp>
<Layout className='min-h-screen'> <Layout className="min-h-screen">
<Header className='sticky top-0 z-10 w-full'> <Header className="sticky top-0 z-10 w-full">
<Row gutter={{ md: 24 }} justify='center'> <img src={AppLogo} className="float-left h-9 my-4 mr-6 ml-0 bg-white/30" alt="App logo" />
<Col span={2}> <p className="text-white text-center">Global Highlights Hub</p>
<img src={AppLogo} className='float-left h-9 my-4 mr-6 ml-0 bg-white/30' alt='App logo' />
</Col>
<Col span={5}><h1 className='text-white text-center'>Global Highlights Hub</h1></Col>
</Row>
</Header> </Header>
<Content className='p-6 m-0 min-h-72 bg-white'> <Content className="p-6 m-0 min-h-72 bg-white">
<Outlet /> <Outlet />
</Content> </Content>
<Footer>China Highlights International Travel Service Co., LTD, Version: {BUILD_VERSION}</Footer> <Footer>China Highlights International Travel Service Co., LTD, Version: {BUILD_VERSION}</Footer>
</Layout> </Layout>
</AntApp> </AntApp>
</ConfigProvider> </ConfigProvider>
) );
} }
export default Standlone export default Standlone;

Loading…
Cancel
Save