File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,18 @@ const SiderMenu: FunctionalComponent<SiderMenuProps> = (props: SiderMenuProps) =
159
159
const hasSplitMenu = computed ( ( ) => props . layout === 'mix' && props . splitMenus ) ;
160
160
const sTheme = computed ( ( ) => ( props . layout === 'mix' && props . navTheme !== 'realDark' && 'light' ) || props . navTheme ) ;
161
161
const sSideWidth = computed ( ( ) => ( props . collapsed ? props . collapsedWidth : props . siderWidth ) ) ;
162
+ const sSideHeaderTop = computed ( ( ) => {
163
+ if ( props . layout === 'mix' ) {
164
+ // 混合菜单布局去除顶栏
165
+ if ( Reflect . get ( props , 'headerRender' ) === false ) {
166
+ return undefined ;
167
+ }
168
+ if ( ! props . isMobile ) {
169
+ return `${ props . headerHeight } px` ;
170
+ }
171
+ }
172
+ return undefined ;
173
+ } ) ;
162
174
const classNames = computed ( ( ) => {
163
175
return {
164
176
[ baseClassName ] : true ,
@@ -234,7 +246,7 @@ const SiderMenu: FunctionalComponent<SiderMenuProps> = (props: SiderMenuProps) =
234
246
collapsedWidth = { collapsedWidth }
235
247
style = { {
236
248
overflow : 'hidden' ,
237
- paddingTop : props . layout === 'mix' && ! props . isMobile ? ` ${ props . headerHeight } px` : undefined ,
249
+ paddingTop : sSideHeaderTop . value ,
238
250
} }
239
251
width = { siderWidth }
240
252
theme = { sTheme . value === 'realDark' ? 'dark' : sTheme . value }
You can’t perform that action at this time.
0 commit comments