Skip to content

Commit 3efe764

Browse files
committed
feat: update layout
1 parent 2af2400 commit 3efe764

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

src/assets/css/init.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
html,
6+
body,
7+
#root {
8+
height: 100%;
9+
width: 100%;
10+
}
11+
512
body,
613
ul,
714
li {

src/layout/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface MenuHeaderProps {
1616
}
1717

1818
const headClass = "z-[999] box-border flex h-14 items-center justify-between p-7 py-3 shadow-ch";
19-
const tabItemClass = "relative mx-4 h-14 cursor-pointer select-none px-3 text-base leading-[3.5rem]";
19+
const tabItemClass = "relative mx-4 h-14 cursor-pointer select-none px-3 text-base leading-[3.5rem] hover:text-primary";
2020

2121
function MenuHeader({ tabId, tabList }: MenuHeaderProps) {
2222
const navigate = useNavigate();

src/layout/index.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,23 @@ function AppLayout({ children }: { children: React.ReactNode }) {
9090
};
9191

9292
return (
93-
<div className={darkMode ? "dark" : ""}>
94-
<ConfigProvider theme={currentThem}>
95-
<Layout>
96-
<MenuHeader tabId={tabId} tabList={routerMenu} />
93+
<ConfigProvider theme={currentThem}>
94+
<Layout className={darkMode ? "dark" : ""}>
95+
<MenuHeader tabId={tabId} tabList={routerMenu} />
9796

98-
<Layout className="h-[calc(100vh-3.5rem)] overflow-hidden">
99-
{sideMenu.length ? <SiderCom selectKey={menuId} menu={sideMenu} /> : null}
97+
<Layout className="h-[calc(100vh-3.5rem)] overflow-hidden">
98+
{sideMenu.length ? <SiderCom selectKey={menuId} menu={sideMenu} /> : null}
10099

101-
<Layout>
102-
<Content className="mx-3">
103-
<BreadCrumb routerPath={routerPathMapping} />
100+
<Layout>
101+
<Content className="mx-3">
102+
<BreadCrumb routerPath={routerPathMapping} />
104103

105-
<div className="h-[calc(100%-4.5rem)] overflow-auto">{children}</div>
106-
</Content>
107-
</Layout>
104+
<div className="h-[calc(100%-4.5rem)] overflow-auto">{children}</div>
105+
</Content>
108106
</Layout>
109107
</Layout>
110-
</ConfigProvider>
111-
</div>
108+
</Layout>
109+
</ConfigProvider>
112110
);
113111
}
114112

0 commit comments

Comments
 (0)