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

fix 578 (#581)

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