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