Skip to content

Commit

Permalink
chore: use antd-V5.30
Browse files Browse the repository at this point in the history
  • Loading branch information
eternallycyf committed Mar 9, 2023
1 parent e6d3f3f commit 0d1542e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@antv/data-set": "^0.11.4",
"@umijs/max": "^4.0.40",
"ahooks": "^3.7.4",
"antd": "^5.1.1",
"antd": "^5.3.0",
"braft-editor": "^2.3.9",
"braft-extensions": "^0.1.1",
"braft-utils": "^3.0.12",
Expand Down
5 changes: 2 additions & 3 deletions scripts/biz-stage-config.ts.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//本文件是自动生成,请勿修改
<% plugins.forEach(function(plugin) { %>import <%= plugin.name %> from '../pages/<%= plugin.name %>/routes';
<% plugins.forEach(function(plugin) { %>import <%= plugin.name %> from '../pages/<%= plugin.name %>/routes';
<% }); %>
export default [
<% plugins.forEach(function(plugin){ %> <%= plugin.name %>,
<% });
%>]

%>];
10 changes: 5 additions & 5 deletions src/core/base/CustomMenu/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
align-items: center;
justify-content: flex-start;
margin-bottom: 8px;
padding-left: 8px;
padding-left: 25px !important;
height: 40px;
background: rgba(255, 255, 255, 0);
color: #fff;
Expand Down Expand Up @@ -114,7 +114,7 @@
font-size: 16px;
}

> .ant-menu-item {
>.ant-menu-item {
margin: 0 0 8px;
font-size: 16px;

Expand Down Expand Up @@ -248,13 +248,13 @@
}

.selected:not(.menuItem) {
> a {
>a {
color: rgba(0, 0, 0, 0.88) !important;
font-weight: 400;
}

&:hover {
> a {
>a {
color: @primary-color !important;
}
}
Expand Down Expand Up @@ -287,4 +287,4 @@
color: #fff;
}
}
}
}
40 changes: 25 additions & 15 deletions src/core/layouts/BasicLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import { WaterMark } from '@/components';
import config from '@/config/projectConfig';
import SiderMenu from '@/core/base/CustomMenu';
import GlobalHeader from '@/core/base/GlobalHeader';
import TagsNav from '@/core/base/TagsNav';
import { connect, withRouter } from '@umijs/max';
import { ConnectState } from '@/typings/connect';
import {
connect,
Dispatch,
getDvaApp,
Helmet,
History,
Outlet,
withRouter,
} from '@umijs/max';
import { RouteComponentProps } from '@umijs/renderer-react';
import { useEffect, Fragment, FC, useState } from 'react';
import SiderMenu from '@/core/base/CustomMenu';
import { Layout, Spin, ConfigProvider, theme as antdTheme } from 'antd';
import { Helmet, History } from '@umijs/max';
import { Dispatch, Outlet } from '@umijs/max';
import { ConfigProvider, Layout, Spin, theme as antdTheme } from 'antd';
import _ from 'lodash';
import { ConnectState } from '@/typings/connect';
import styles from './index.less';
import config from '@/config/projectConfig';
import { WaterMark } from '@/components';
import { menuList as routes } from 'mock/user';
import GlobalHeader from '@/core/base/GlobalHeader';
import { FC, Fragment, useEffect, useState } from 'react';
import ColorPicker from '../base/GlobalHeader/ColorPicker';
import styles from './index.less';
const { Sider, Content, Header } = Layout;
const { title } = config;

Expand Down Expand Up @@ -69,18 +74,23 @@ const BasicLayout: FC<IBasicLayout> = (props) => {
handleRouterChange();
}, [dispatch]);

const {
breadcrumbNameMap: localBreadcrumbNameMap = {},
menuList: localMenuList = [],
} = getDvaApp()._store.getState().global;

const siderMenuProps = {
theme,
menuList,
menuList: menuList || localMenuList,
location,
collapsed,
sliderMenuState,
dispatch,
};

const TagsNavProps = {
breadcrumbNameMap,
menuList,
breadcrumbNameMap: breadcrumbNameMap || localBreadcrumbNameMap,
menuList: menuList || localMenuList,
location,
};

Expand Down

0 comments on commit 0d1542e

Please sign in to comment.