diff --git a/package.json b/package.json
index dd2eba3ab06ba228e6f9bcdf81ffdeb029fbd438..94a5900d11338da82b3ce571e0b6930be490cfff 100755
--- a/package.json
+++ b/package.json
@@ -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": {
diff --git a/src/components/HeaderSearch/index.js b/src/components/HeaderSearch/index.js
index 5fd3f5f5d25dff44b9b5b12fb8612ca4b37bd0a7..85c990efa382cb58abb9b92f5499574ac41eab1e 100644
--- a/src/components/HeaderSearch/index.js
+++ b/src/components/HeaderSearch/index.js
@@ -64,8 +64,9 @@ export default class HeaderSearch extends PureComponent {
className={classNames(className, styles.headerSearch)}
onClick={this.enterSearchMode}
>
-
+
{
- 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}
>
-
+
Ant Design Pro