File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 class ="content "
2828 id ="right-side "
2929 [nzSize] ="settingLayoutSize.rightWidth "
30+ [style.flex-grow] ="settingLayoutSize.rightWidth === undefined ? 1 : null "
3031 >
3132 < div >
3233 < elements-content (toggleMenu) ="onToggleMobileLayout() "> </ elements-content >
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export class PageMainComponent implements OnInit {
1515 showIframeHider = false ;
1616 showSubMenu : any = false ;
1717 isDirectNavigation : boolean ;
18- settingLayoutSize = {
18+ settingLayoutSize : {
19+ leftWidth : string | number ;
20+ rightWidth : string | number | undefined ;
21+ } = {
1922 leftWidth : '20%' ,
2023 rightWidth : '80%'
2124 } ;
@@ -49,8 +52,14 @@ export class PageMainComponent implements OnInit {
4952 }
5053
5154 handleLayoutSettingChange ( collapsed : boolean ) {
52- this . settingLayoutSize . leftWidth = collapsed ? '60' : '20%' ;
53- this . settingLayoutSize . rightWidth = collapsed ? ( window . innerWidth - 60 ) . toString ( ) : '80%' ;
55+ this . collapsed = collapsed ;
56+ if ( collapsed ) {
57+ this . settingLayoutSize . leftWidth = 60 ;
58+ this . settingLayoutSize . rightWidth = undefined ;
59+ } else {
60+ this . settingLayoutSize . leftWidth = '20%' ;
61+ this . settingLayoutSize . rightWidth = '80%' ;
62+ }
5463 }
5564
5665 onToggleMobileLayout ( ) { }
@@ -100,7 +109,7 @@ export class PageMainComponent implements OnInit {
100109
101110 if ( leftWidth < 100 && ! this . collapsed ) {
102111 leftWidth = 60 ;
103- rightWidth = window . innerWidth - leftWidth ;
112+ rightWidth = undefined ;
104113 this . collapsed = true ;
105114 } else if ( leftWidth > 100 && this . collapsed ) {
106115 leftWidth = '20%' ;
You can’t perform that action at this time.
0 commit comments