Skip to content

Commit 25f7b65

Browse files
committed
CSS 布局修正
1 parent e601f6c commit 25f7b65

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

src/pages/components/layout/MainLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const MainLayout: React.FC<{
201201
locale={arcoLocale(i18n.language)}
202202
>
203203
{contextHolder}
204-
<Layout>
204+
<Layout className={"uno-min-h-screen"}>
205205
<Layout.Header
206206
style={{
207207
height: "50px",
@@ -382,7 +382,7 @@ const MainLayout: React.FC<{
382382
</Space>
383383
</Layout.Header>
384384
<Layout
385-
className={`uno-absolute uno-top-50px uno-bottom-0 uno-w-full ${className}`}
385+
className={`uno-bottom-0 uno-w-full ${className}`}
386386
style={{
387387
background: "var(--color-fill-2)",
388388
}}

src/pages/components/layout/Sider.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const Sider: React.FC = () => {
4949
return (
5050
<HashRouter>
5151
<SiderGuide ref={guideRef} />
52-
<Layout.Sider className="uno-h-full" collapsed={collapsed} width={170}>
52+
<Layout.Sider collapsed={collapsed} width={170}>
5353
<div className="uno-flex uno-flex-col uno-justify-between uno-h-full">
5454
<Menu style={{ width: "100%" }} selectedKeys={[menuSelect]} selectable onClickMenuItem={handleMenuClick}>
5555
<CustomLink to="/">
@@ -160,23 +160,25 @@ const Sider: React.FC = () => {
160160
style={{
161161
borderLeft: "1px solid var(--color-bg-5)",
162162
overflow: "hidden",
163-
padding: 10,
164-
height: "100%",
163+
padding: 0,
164+
height: "auto",
165165
boxSizing: "border-box",
166166
position: "relative",
167167
}}
168168
>
169-
<Routes>
170-
<Route index element={<ScriptList />} />
171-
<Route path="/script/editor">
172-
<Route path=":uuid" element={<ScriptEditor />} />
173-
<Route path="" element={<ScriptEditor />} />
174-
</Route>
175-
<Route path="/subscribe" element={<SubscribeList />} />
176-
<Route path="/logger" element={<Logger />} />
177-
<Route path="/tools" element={<Tools />} />
178-
<Route path="/setting" element={<Setting />} />
179-
</Routes>
169+
<div className="uno-absolute uno-inset-0 uno-m-[10px]">
170+
<Routes>
171+
<Route index element={<ScriptList />} />
172+
<Route path="/script/editor">
173+
<Route path=":uuid" element={<ScriptEditor />} />
174+
<Route path="" element={<ScriptEditor />} />
175+
</Route>
176+
<Route path="/subscribe" element={<SubscribeList />} />
177+
<Route path="/logger" element={<Logger />} />
178+
<Route path="/tools" element={<Tools />} />
179+
<Route path="/setting" element={<Setting />} />
180+
</Routes>
181+
</div>
180182
</Layout.Content>
181183
</HashRouter>
182184
);

src/pages/options/routes/script/ScriptEditor.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,17 +1118,18 @@ function ScriptEditor() {
11181118
/>
11191119
))}
11201120
</Tabs>
1121-
<div className="uno-flex uno-flex-grow uno-flex-1">
1121+
<div className="uno-flex uno-flex-grow uno-flex-1 uno-relative">
11221122
{editors.map((item) => {
11231123
if (item.active) {
11241124
document.title = `${i18nName(item.script)} - Script Editor`;
11251125
}
11261126
return (
11271127
<div
1128-
className="uno-w-full"
1128+
className="uno-w-full uno-absolute"
11291129
key={`fe_${item.script.uuid}`}
11301130
style={{
11311131
display: item.active ? "block" : "none",
1132+
inset: 0,
11321133
}}
11331134
>
11341135
<WarpEditor

0 commit comments

Comments
 (0)