diff --git a/.eslintrc.js b/.eslintrc.js
index faa6a366e2d35c87680259da9fa9c56a21f7c39b..273b854cfa9bb3d615a93af2ebe6d1396c5854b4 100755
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -15,8 +15,8 @@ module.exports = {
'react/prop-types': 0,
'react/forbid-prop-types': 0,
'react/jsx-one-expression-per-line': 0,
- 'import/no-unresolved': 0,
- 'import/no-extraneous-dependencies': 0,
+ 'import/no-unresolved': [2, { ignore: ['^@', '^umi/'] }],
+ 'import/no-extraneous-dependencies': [2, { optionalDependencies: true }],
'jsx-a11y/no-noninteractive-element-interactions': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/no-static-element-interactions': 0,
diff --git a/package.json b/package.json
index 83d099977852f3d033ad0dfc569dd69e1705f988..bbb44f36330a82d84c01bdae228584239c303a25 100755
--- a/package.json
+++ b/package.json
@@ -29,9 +29,11 @@
"bizcharts": "^3.1.10",
"bizcharts-plugin-slider": "^2.0.3",
"classnames": "^2.2.6",
+ "dva": "^2.4.0",
"enquire-js": "^0.2.1",
+ "hash.js": "^1.1.5",
+ "lodash": "^4.17.10",
"lodash-decorators": "^6.0.0",
- "lodash.isequal": "^4.5.0",
"memoize-one": "^4.0.0",
"moment": "^2.22.2",
"numeral": "^2.0.6",
@@ -39,11 +41,15 @@
"path-to-regexp": "^2.4.0",
"prop-types": "^15.5.10",
"qs": "^6.5.2",
+ "rc-animate": "^2.4.4",
"react": "^16.4.1",
"react-container-query": "^0.11.0",
"react-copy-to-clipboard": "^5.0.1",
"react-document-title": "^2.0.3",
- "react-fittext": "^1.0.0"
+ "react-dom": "^16.4.2",
+ "react-fittext": "^1.0.0",
+ "react-router-dom": "^4.3.1",
+ "umi": "^2.0.0-beta.10"
},
"devDependencies": {
"@types/react": "^16.4.11",
@@ -72,7 +78,6 @@
"stylelint": "^9.4.0",
"stylelint-config-prettier": "^4.0.0",
"stylelint-config-standard": "^18.0.0",
- "umi": "^2.0.0-beta.10",
"umi-plugin-react": "^1.0.0-beta.10"
},
"optionalDependencies": {
diff --git a/src/components/Authorized/AuthorizedRoute.js b/src/components/Authorized/AuthorizedRoute.js
index 7534fabc27ba9e46e6dbb98609b95191cc8d4ea6..39c6a665f1bf522622ac73e2333f0739c587b1a2 100644
--- a/src/components/Authorized/AuthorizedRoute.js
+++ b/src/components/Authorized/AuthorizedRoute.js
@@ -2,19 +2,14 @@ import React from 'react';
import { Route, Redirect } from 'react-router-dom';
import Authorized from './Authorized';
-class AuthorizedRoute extends React.Component {
- render() {
- // TODO: umi只会返回render和rest
- const { component: Component, render, authority, redirectPath, ...rest } = this.props;
- return (
- } />}
- >
- (Component ? : render(props))} />
-
- );
- }
-}
+// TODO: umi只会返回render和rest
+const AuthorizedRoute = ({ component: Component, render, authority, redirectPath, ...rest }) => (
+ } />}
+ >
+ (Component ? : render(props))} />
+
+);
export default AuthorizedRoute;
diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js
index e949f5276903b71e9afb9b908b7f1e35e37a89ab..8f98001632193953ce90a155d1857fe6752b743f 100644
--- a/src/layouts/BasicLayout.js
+++ b/src/layouts/BasicLayout.js
@@ -1,7 +1,7 @@
import React from 'react';
import { Layout } from 'antd';
import DocumentTitle from 'react-document-title';
-import deepEqual from 'lodash.isequal';
+import deepEqual from 'lodash/isEqual';
import memoizeOne from 'memoize-one';
import { connect } from 'dva';
import { ContainerQuery } from 'react-container-query';
diff --git a/src/pages/Forms/TableForm.js b/src/pages/Forms/TableForm.js
index dc590fc5d73ac626c249008ea39a4f2b5b9f86d9..9bfd8acf3c16a2d1d3e140f30f2c8744d2a8c289 100644
--- a/src/pages/Forms/TableForm.js
+++ b/src/pages/Forms/TableForm.js
@@ -1,6 +1,6 @@
import React, { PureComponent, Fragment } from 'react';
import { Table, Button, Input, message, Popconfirm, Divider } from 'antd';
-import isEqual from 'lodash.isequal';
+import isEqual from 'lodash/isEqual';
import styles from './style.less';
export default class TableForm extends PureComponent {