Commit fbba9569 authored by 曾婧's avatar 曾婧

fix: 修改华农主题先加载样式再展示

parent 2d27598b
Pipeline #48528 passed with stages
in 2 minutes 16 seconds
...@@ -5,7 +5,7 @@ import { ReactSVG } from 'react-svg'; ...@@ -5,7 +5,7 @@ import { ReactSVG } from 'react-svg';
import useMergedState from 'rc-util/lib/hooks/useMergedState'; import useMergedState from 'rc-util/lib/hooks/useMergedState';
import { useHistory } from '@wisdom-utils/runtime'; import { useHistory } from '@wisdom-utils/runtime';
import ProLayout, { getPageTitle } from '@ant-design/pro-layout'; import ProLayout, { getPageTitle } from '@ant-design/pro-layout';
import '../../../HN.less'; import HNStyles from '../../../HN.less';
const LoadingSkeleton = props => { const LoadingSkeleton = props => {
const { route } = props; const { route } = props;
return ( return (
...@@ -78,7 +78,7 @@ const Menu = props => { ...@@ -78,7 +78,7 @@ const Menu = props => {
); );
return ( return (
<LoadingSkeleton {...props}> <LoadingSkeleton {...props}>
{route && route.routes && route.routes.length > 0 && ( {route && route.routes && route.routes.length > 0 && HNStyles && (
<React.Fragment> <React.Fragment>
{menuHeaderRender ? ( {menuHeaderRender ? (
menuHeaderRender(props) menuHeaderRender(props)
...@@ -138,9 +138,7 @@ const Menu = props => { ...@@ -138,9 +138,7 @@ const Menu = props => {
) : null ) : null
} }
subMenuItemRender={(item, dom) => ( subMenuItemRender={(item, dom) => (
<div <div className={classNames(`test-icon`)}>
className={classNames(`test-icon`)}
>
{/.svg/.test(item.extData.icon) ? ( {/.svg/.test(item.extData.icon) ? (
<div className="my-svg"> <div className="my-svg">
<ReactSVG src={item.extData.icon} style={{ width: '100%', height: '100%' }} /> <ReactSVG src={item.extData.icon} style={{ width: '100%', height: '100%' }} />
...@@ -157,7 +155,6 @@ const Menu = props => { ...@@ -157,7 +155,6 @@ const Menu = props => {
</div> </div>
)} )}
/> />
</ul> </ul>
</React.Fragment> </React.Fragment>
)} )}
......
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