Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc3b5329

Browse files
committed
[Fix]:#2086 nav desktop app layout in publish mode
1 parent8086c26 commitc3b5329

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

‎client/packages/lowcoder/src/comps/comps/layout/navLayout.tsx‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ const DEFAULT_WIDTH = 240;
4949
typeMenuItemStyleOptionValue="normal"|"hover"|"active";
5050
constEventOptions=[clickEvent]asconst;
5151

52-
constStyledSide=styled(LayoutSider)`
53-
max-height: calc(100vh -${TopHeaderHeight});
52+
constStyledSide=styled(LayoutSider)<{$isPreview:boolean}>`
53+
max-height:${(props)=>(props.$isPreview ?`calc(100vh -${TopHeaderHeight})` :"100vh")};
5454
overflow: auto;
5555
5656
.ant-menu-item:first-child {
@@ -199,6 +199,11 @@ const StyledMenu = styled(AntdMenu)<{
199199
200200
`;
201201

202+
203+
constViewerMainContent=styled(MainContent)<{$isPreview:boolean}>`
204+
height:${(props)=>(props.$isPreview ?`calc(100vh -${TopHeaderHeight})` :"100vh")};
205+
`;
206+
202207
constStyledImage=styled.img`
203208
height: 1em;
204209
color: currentColor;
@@ -355,6 +360,7 @@ let NavTmpLayout = (function () {
355360
NavTmpLayout=withViewFn(NavTmpLayout,(comp)=>{
356361
constpathParam=useAppPathParam();
357362
constisViewMode=isUserViewMode(pathParam);
363+
constisPreview=pathParam.viewMode==="preview";
358364
const[selectedKey,setSelectedKey]=useState("");
359365
constitems=comp.children.items.getView();
360366
constnavWidth=comp.children.width.getView();
@@ -674,25 +680,25 @@ NavTmpLayout = withViewFn(NavTmpLayout, (comp) => {
674680
);
675681

676682
letcontent=(
677-
<Layout>
683+
<Layoutstyle={{height:isPreview ?undefined :"100vh"}}>
678684
{(navPosition==='top')&&(
679685
<Headerstyle={{display:'flex',alignItems:'center',padding:0}}>
680686
{navMenu}
681687
</Header>
682688
)}
683689
{(navPosition==='left')&&(
684-
<StyledSidetheme="light"width={navWidth}collapsed={navCollapse}>
690+
<StyledSide$isPreview={isPreview}theme="light"width={navWidth}collapsed={navCollapse}>
685691
{navMenu}
686692
</StyledSide>
687693
)}
688-
<MainContent>{pageView}</MainContent>
694+
<ViewerMainContent$isPreview={isPreview}>{pageView}</ViewerMainContent>
689695
{(navPosition==='bottom')&&(
690696
<Footerstyle={{display:'flex',alignItems:'center',padding:0}}>
691697
{navMenu}
692698
</Footer>
693699
)}
694700
{(navPosition==='right')&&(
695-
<StyledSidetheme="light"width={navWidth}collapsed={navCollapse}>
701+
<StyledSide$isPreview={isPreview}theme="light"width={navWidth}collapsed={navCollapse}>
696702
{navMenu}
697703
</StyledSide>
698704
)}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp