File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
client/packages/lowcoder/src/comps/comps/pageLayoutComp Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,18 @@ const getStyle = (style: ContainerStyleType) => {
39
39
` ;
40
40
} ;
41
41
42
- const Wrapper = styled . div < { $style : ContainerStyleType , $animationStyle :AnimationStyleType } > `
42
+ const Wrapper = styled . div < { $style : ContainerStyleType , $animationStyle :AnimationStyleType , $mainScrollbars : boolean } > `
43
43
display: flex;
44
44
flex-flow: column;
45
45
height: 100%;
46
46
border: 1px solid #d7d9e0;
47
47
border-radius: 4px;
48
48
${ ( props ) => props . $style && getStyle ( props . $style ) }
49
49
${ props => props . $animationStyle }
50
+
51
+ #pageLayout::-webkit-scrollbar {
52
+ display: ${ ( props ) => props . $mainScrollbars ? "block" : "none" } ;
53
+ }
50
54
` ;
51
55
52
56
const HeaderInnerGrid = styled ( InnerGrid ) < {
@@ -156,8 +160,8 @@ export function PageLayout(props: LayoutProps & { siderCollapsed: boolean; setSi
156
160
} ,
157
161
} }
158
162
>
159
- < Wrapper $style = { style } $animationStyle = { animationStyle } >
160
- < Layout style = { { padding : "0px" , overflow : container . mainScrollbars ? "scroll" : "visible "} } hasSider = { showSider && ! container . innerSider } >
163
+ < Wrapper $style = { style } $animationStyle = { animationStyle } $mainScrollbars = { container . mainScrollbars } >
164
+ < Layout id = "pageLayout" style = { { padding : "0px" , overflowY : "scroll" } } hasSider = { showSider && ! container . innerSider } >
161
165
{ showSider && ! container . innerSider && ! container . siderRight && (
162
166
< > < BackgroundColorContext . Provider value = { siderStyle ?. siderBackground } >
163
167
< Sider
Original file line number Diff line number Diff line change @@ -159,7 +159,11 @@ export class PageLayoutComp extends layoutBaseComp implements IContainer {
159
159
return [
160
160
this . children . autoHeight . getPropertyView ( ) ,
161
161
this . children . siderScrollbars . propertyView ( { label : trans ( "prop.siderScrollbar" ) } ) ,
162
- ( ! this . children . autoHeight . getView ( ) ) && this . children . mainScrollbars . propertyView ( { label : trans ( "prop.mainScrollbar" ) } ) ,
162
+ ( ! this . children . autoHeight . getView ( ) ) && (
163
+ ! this . children . siderScrollbars . getView ( ) ||
164
+ ! this . children . contentScrollbars . getView ( )
165
+ ) &&
166
+ this . children . mainScrollbars . propertyView ( { label : trans ( "prop.mainScrollbar" ) } ) ,
163
167
( ! this . children . autoHeight . getView ( ) ) && this . children . contentScrollbars . propertyView ( { label : trans ( "prop.showVerticalScrollbar" ) } ) ,
164
168
] ;
165
169
}
You can’t perform that action at this time.
0 commit comments