diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index a8cfca2887321c4a2fea668150ca447ae09cb1b3..a4b1777bdc1f452c8b609f1eeb0deaa528e95441 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -1,8 +1,6 @@ import React, { PureComponent, createElement } from 'react'; import pathToRegexp from 'path-to-regexp'; import { Breadcrumb, Tabs, Card } from 'antd'; -import memoizeOne from 'memoize-one'; -import deepEqual from 'lodash.isequal'; import classNames from 'classnames'; import styles from './index.less'; import { urlToList } from '../_utils/pathTools'; @@ -21,11 +19,6 @@ export const getBreadcrumb = (breadcrumbNameMap, url) => { }; export default class PageHeader extends PureComponent { - constructor(props) { - super(props); - this.conversionFromLocation = memoizeOne(this.conversionFromLocation, deepEqual); - } - state = { breadcrumb: null, }; diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index e2341045bd32e7718a5310e665d0e6f020852b36..44e86b1748a9921b3063bc1223f8e44c225b75ed 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -1,6 +1,7 @@ import React from 'react'; import { Layout } from 'antd'; import DocumentTitle from 'react-document-title'; +import deepEqual from 'lodash.isequal'; import memoizeOne from 'memoize-one'; import { connect } from 'dva'; import { ContainerQuery } from 'react-container-query'; @@ -35,7 +36,7 @@ const getBreadcrumbNameMap = memoizeOne(meun => { }; mergeMeunAndRouter(meun); return routerMap; -}); +}, deepEqual); const query = { 'screen-xs': {