Commit 77cb2917 authored by Sendya's avatar Sendya

fix: menuHeaderRender props not support top-menu

parent a2838d38
...@@ -32,18 +32,20 @@ const renderContent = (h, props) => { ...@@ -32,18 +32,20 @@ const renderContent = (h, props) => {
const maxWidth = 1200 - 280 - 120 const maxWidth = 1200 - 280 - 120
const contentWidth = props.contentWidth === 'Fixed' const contentWidth = props.contentWidth === 'Fixed'
const baseCls = 'ant-pro-top-nav-header' const baseCls = 'ant-pro-top-nav-header'
const { logo, title, theme, isMobile, headerRender, rightContentRender } = props const { logo, title, theme, isMobile, headerRender, rightContentRender, menuHeaderRender } = props
const rightContentProps = { theme, isTop, isMobile } const rightContentProps = { theme, isTop, isMobile }
let defaultDom = <GlobalHeader {...{ props: props }} /> let defaultDom = <GlobalHeader {...{ props: props }} />
if (isTop && !isMobile) { if (isTop && !isMobile) {
defaultDom = ( defaultDom = (
<div class={[baseCls, theme]}> <div class={[baseCls, theme]}>
<div class={[`${baseCls}-main`, contentWidth ? 'wide' : '']}> <div class={[`${baseCls}-main`, contentWidth ? 'wide' : '']}>
<div class={`${baseCls}-left`}> {menuHeaderRender && (
<div class={`${baseCls}-logo`} key="logo" id="logo"> <div class={`${baseCls}-left`}>
{defaultRenderLogoAntTitle(h, { logo, title, menuHeaderRender: null })} <div class={`${baseCls}-logo`} key="logo" id="logo">
{defaultRenderLogoAntTitle(h, { logo, title, menuHeaderRender })}
</div>
</div> </div>
</div> )}
<div class={`${baseCls}-menu`} style={{ maxWidth: `${maxWidth}px`, flex: 1 }}> <div class={`${baseCls}-menu`} style={{ maxWidth: `${maxWidth}px`, flex: 1 }}>
<BaseMenu {...{ props: props }} /> <BaseMenu {...{ props: props }} />
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment