From 48e9647d58e44a157d9486c29b33768f9c1193dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E4=BA=9A=E6=98=95?= <1549469775@qq.com> Date: Tue, 19 Nov 2024 09:44:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=80=E5=8F=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/withPage.tsx | 1 + src/index.css | 12 +++++++----- src/layout/GlobalStyles.ts | 4 +--- src/layout/base.tsx | 6 +++--- src/views/Home/index.tsx | 19 ++----------------- 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/base/withPage.tsx b/src/base/withPage.tsx index 4fa7015..a97f6c0 100644 --- a/src/base/withPage.tsx +++ b/src/base/withPage.tsx @@ -9,6 +9,7 @@ interface PageProps { const StyleAnim = styled(OpacityIn)` position: relative; + height: 100%; ` function withPage(WrappedComponent: FC) { diff --git a/src/index.css b/src/index.css index b69b205..e91f86d 100644 --- a/src/index.css +++ b/src/index.css @@ -3,10 +3,12 @@ @import "@blueprintjs/icons/lib/css/blueprint-icons.css"; @import "@blueprintjs/table/lib/css/table.css"; -/* html, -body { +html,body, #root{ height: 100%; } -#root { - min-height: 100%; -} */ + +.container { + max-width: 1200px; + margin: 0 auto; +} + diff --git a/src/layout/GlobalStyles.ts b/src/layout/GlobalStyles.ts index 02bc630..56c2963 100644 --- a/src/layout/GlobalStyles.ts +++ b/src/layout/GlobalStyles.ts @@ -1,7 +1,5 @@ import { createGlobalStyle } from "styled-components" export const GlobalStyles = createGlobalStyle` - html,body, #root{ - height: 100%; - } + ` diff --git a/src/layout/base.tsx b/src/layout/base.tsx index 8d50bd4..0a9b4c3 100644 --- a/src/layout/base.tsx +++ b/src/layout/base.tsx @@ -1,5 +1,5 @@ import { Alignment, Button, Dialog, DialogBody, DialogFooter, Menu, MenuDivider, MenuItem, Navbar, Popover } from "@blueprintjs/core" -import { FC, ReactNode, useState } from "react" +import { ReactNode, useState } from "react" import { NavLink, useHistory } from "react-router-dom" import styled from "styled-components" import { GlobalStyles } from "./GlobalStyles" @@ -34,7 +34,7 @@ function BaseLayout(props: PageProps) { 东风天堂 - +