Commit fa79d05f authored by 陈帅's avatar 陈帅 Committed by ddcat1115

fix 578 (#581)

parent 013247c6
...@@ -45,25 +45,25 @@ ...@@ -45,25 +45,25 @@
"react-fittext": "^1.0.0" "react-fittext": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"babel-eslint": "^8.0.1", "babel-eslint": "^8.1.2",
"babel-jest": "^22.0.4", "babel-jest": "^22.0.4",
"babel-plugin-dva-hmr": "^0.4.1", "babel-plugin-dva-hmr": "^0.4.1",
"babel-plugin-import": "^1.2.1", "babel-plugin-import": "^1.6.3",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "^6.9.0", "babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1", "babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
"cross-env": "^5.1.1", "cross-env": "^5.1.1",
"cross-port-killer": "^1.0.1", "cross-port-killer": "^1.0.1",
"enzyme": "^3.1.0", "enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.0.2", "enzyme-adapter-react-16": "^1.0.2",
"eslint": "^4.8.0", "eslint": "^4.14.0",
"eslint-config-airbnb": "^16.0.0", "eslint-config-airbnb": "^16.0.0",
"eslint-plugin-babel": "^4.0.0", "eslint-plugin-babel": "^4.0.0",
"eslint-plugin-compat": "^2.1.0", "eslint-plugin-compat": "^2.1.0",
"eslint-plugin-import": "^2.2.0", "eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.0", "eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-markdown": "^1.0.0-beta.6", "eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-react": "^7.0.1", "eslint-plugin-react": "^7.0.1",
"gh-pages": "^1.0.0", "gh-pages": "^1.0.0",
...@@ -72,14 +72,13 @@ ...@@ -72,14 +72,13 @@
"jsdom": "^11.5.1", "jsdom": "^11.5.1",
"lint-staged": "^6.0.0", "lint-staged": "^6.0.0",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
"prettier": "^1.9.0", "pro-download": "^1.0.1",
"pro-download": "^1.0.0", "react-test-renderer": "^16.2.0",
"react-test-renderer": "^16.0.0", "redbox-react": "^1.5.0",
"redbox-react": "^1.3.2", "roadhog": "^2.0.3",
"roadhog": "^2.0.0-0",
"roadhog-api-doc": "^0.3.3", "roadhog-api-doc": "^0.3.3",
"rollbar": "^2.3.1", "rollbar": "^2.3.4",
"stylelint": "^8.1.0", "stylelint": "^8.4.0",
"stylelint-config-standard": "^18.0.0" "stylelint-config-standard": "^18.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
......
...@@ -64,8 +64,9 @@ export default class HeaderSearch extends PureComponent { ...@@ -64,8 +64,9 @@ export default class HeaderSearch extends PureComponent {
className={classNames(className, styles.headerSearch)} className={classNames(className, styles.headerSearch)}
onClick={this.enterSearchMode} onClick={this.enterSearchMode}
> >
<Icon type="search" /> <Icon type="search" key="Icon" />
<AutoComplete <AutoComplete
key="AutoComplete"
{...restProps} {...restProps}
className={inputClass} className={inputClass}
value={this.state.value} value={this.state.value}
......
...@@ -141,13 +141,13 @@ export default class SiderMenu extends PureComponent { ...@@ -141,13 +141,13 @@ export default class SiderMenu extends PureComponent {
if (!menusData) { if (!menusData) {
return []; return [];
} }
return menusData.map((item) => { return menusData
if (!item.name || item.hideInMenu) { .filter(item => item.name && !item.hideInMenu)
return null; .map((item) => {
}
const ItemDom = this.getSubMenuOrItem(item); const ItemDom = this.getSubMenuOrItem(item);
return this.checkPermissionItem(item.authority, ItemDom); return this.checkPermissionItem(item.authority, ItemDom);
}); })
.filter(item => !!item);
} }
// conversion Path // conversion Path
// 转化路径 // 转化路径
...@@ -200,13 +200,14 @@ export default class SiderMenu extends PureComponent { ...@@ -200,13 +200,14 @@ export default class SiderMenu extends PureComponent {
width={256} width={256}
className={styles.sider} className={styles.sider}
> >
<div className={styles.logo}> <div className={styles.logo} key="logo">
<Link to="/"> <Link to="/">
<img src={logo} alt="logo" /> <img src={logo} alt="logo" />
<h1>Ant Design Pro</h1> <h1>Ant Design Pro</h1>
</Link> </Link>
</div> </div>
<Menu <Menu
key="Menu"
theme="dark" theme="dark"
mode="inline" mode="inline"
{...menuProps} {...menuProps}
......
import React, { PureComponent } from 'react'; import React, { PureComponent, Fragment } from 'react';
import moment from 'moment'; import moment from 'moment';
import { Table, Alert, Badge, Divider } from 'antd'; import { Table, Alert, Badge, Divider } from 'antd';
import styles from './index.less'; import styles from './index.less';
...@@ -96,11 +96,11 @@ class StandardTable extends PureComponent { ...@@ -96,11 +96,11 @@ class StandardTable extends PureComponent {
{ {
title: '操作', title: '操作',
render: () => ( render: () => (
<div> <Fragment>
<a href="">配置</a> <a href="">配置</a>
<Divider type="vertical" /> <Divider type="vertical" />
<a href="">订阅警报</a> <a href="">订阅警报</a>
</div> </Fragment>
), ),
}, },
]; ];
......
...@@ -2,14 +2,15 @@ import React, { PureComponent } from 'react'; ...@@ -2,14 +2,15 @@ import React, { PureComponent } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { Row, Col, Card, Tooltip } from 'antd'; import { Row, Col, Card, Tooltip } from 'antd';
import numeral from 'numeral'; import numeral from 'numeral';
import { Secured } from '../../utils/Authorized'; import Authorized from '../../utils/Authorized';
import { Pie, WaterWave, Gauge, TagCloud } from '../../components/Charts'; import { Pie, WaterWave, Gauge, TagCloud } from '../../components/Charts';
import NumberInfo from '../../components/NumberInfo'; import NumberInfo from '../../components/NumberInfo';
import CountDown from '../../components/CountDown'; import CountDown from '../../components/CountDown';
import ActiveChart from '../../components/ActiveChart'; import ActiveChart from '../../components/ActiveChart';
import styles from './Monitor.less'; import styles from './Monitor.less';
const { Secured } = Authorized;
const targetTime = new Date().getTime() + 3900000; const targetTime = new Date().getTime() + 3900000;
@Secured('admin') @Secured('admin')
......
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