diff --git a/package.json b/package.json index 3c01e941029535e9b1049746c6c36b99bcba235b..601d572363d13957ddb04c43b61ae8423679e2e5 100755 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@antv/data-set": "^0.9.0", - "antd": "^3.8.2", + "antd": "^3.9.0-beta.0", "bizcharts": "^3.1.10", "bizcharts-plugin-slider": "^2.0.3", "classnames": "^2.2.6", diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index a4b1777bdc1f452c8b609f1eeb0deaa528e95441..ef0a563c301f0f7fac4dc5805e1ac9a7a25cdc78 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -1,6 +1,6 @@ import React, { PureComponent, createElement } from 'react'; import pathToRegexp from 'path-to-regexp'; -import { Breadcrumb, Tabs, Card } from 'antd'; +import { Breadcrumb, Tabs, Skeleton } from 'antd'; import classNames from 'classnames'; import styles from './index.less'; import { urlToList } from '../_utils/pathTools'; @@ -200,34 +200,36 @@ export default class PageHeader extends PureComponent { activeKeyProps.activeKey = tabActiveKey; } return ( - - {breadcrumb} -
- {logo &&
{logo}
} -
-
- {title &&

{title}

} - {action &&
{action}
} -
-
- {content &&
{content}
} - {extraContent &&
{extraContent}
} +
+ + {breadcrumb} +
+ {logo &&
{logo}
} +
+
+ {title &&

{title}

} + {action &&
{action}
} +
+
+ {content &&
{content}
} + {extraContent &&
{extraContent}
} +
-
- {tabList && tabList.length ? ( - - {tabList.map(item => ( - - ))} - - ) : null} - + {tabList && tabList.length ? ( + + {tabList.map(item => ( + + ))} + + ) : null} + +
); } } diff --git a/src/global.less b/src/global.less index 00892866f0ac16d7ec73f7c86f717b8f7a321226..69b08c7369eefc044fe9af806809f0cb09ad0c0f 100644 --- a/src/global.less +++ b/src/global.less @@ -27,6 +27,11 @@ body { margin: 40px 0 !important; } +ul, +ol { + list-style: none; +} + :global { body .ant-drawer .ant-drawer-content { opacity: 1; diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 4f2b9a00ac215b35505355915cafe806bbeeedac..14299d2cc84e57d9756ab13039d10e3a1e1d0bda 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -71,6 +71,7 @@ class BasicLayout extends React.PureComponent { super(props); const { menuData } = this.props; this.getPageTitle = memoizeOne(this.getPageTitle); + // Because there are many places to be. So put it here this.breadcrumbNameMap = getBreadcrumbNameMap(menuData); } getContext() { @@ -80,6 +81,10 @@ class BasicLayout extends React.PureComponent { breadcrumbNameMap: this.breadcrumbNameMap, }; } + componentDidUpdate() { + const { menuData } = this.props; + this.breadcrumbNameMap = getBreadcrumbNameMap(menuData); + } getPageTitle = pathname => { let currRouterData = null; // match params path