diff --git a/.eslintrc b/.eslintrc
index e482bcc..3710267 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -6,6 +6,7 @@
"comma-dangle": [2, "always-multiline"],
"max-len": 0,
"react/jsx-first-prop-new-line": 0,
+ "react/jsx-filename-extension": 0,
"space-before-function-paren": [2, "always"],
"no-unused-expressions": [0, {
"allowShortCircuit": true,
@@ -18,11 +19,23 @@
"no-param-reassign": 0,
"no-restricted-syntax": 0,
"no-eval": 0,
+ "no-continue": 0,
"react/jsx-no-bind": 0,
"no-unused-vars": [2, { "ignoreRestSiblings": true }],
"no-underscore-dangle": 0,
"global-require": 0,
- "import/no-unresolved": [0],
+ "import/no-unresolved": 0,
+ "import/extensions": 0,
+ "jsx-a11y/href-no-hash": 0,
+ "react/no-array-index-key": 0,
+ "react/require-default-props": 0,
+ "react/forbid-prop-types": 0,
+ "react/no-string-refs": 0,
+ "react/no-find-dom-node": 0,
+ "import/no-extraneous-dependencies": 0,
+ "import/prefer-default-export": 0,
+ "react/no-danger": 0,
+ "jsx-a11y/no-static-element-interactions": 0,
},
"parser": "babel-eslint",
"parserOptions": {
diff --git a/package.json b/package.json
index 8db25d8..6f1e418 100644
--- a/package.json
+++ b/package.json
@@ -2,13 +2,22 @@
"private": true,
"dependencies": {
"antd": "^2.11.2",
+ "axios": "^0.16.2",
+ "babel-polyfill": "^6.23.0",
"classnames": "^2.2.5",
+ "d3-shape": "^1.2.0",
"draftjs-to-markdown": "^0.4.0",
"dva": "^1.2.0",
"dva-loading": "^0.2.0",
+ "jsonp": "^0.2.1",
+ "less-vars-to-js": "^1.1.2",
"lodash": "^4.17.4",
+ "mockjs": "^1.0.1-beta3",
"nprogress": "^0.2.0",
+ "path-to-regexp": "^1.7.0",
+ "prop-types": "^15.5.10",
"qs": "^6.5.0",
+ "rc-tween-one": "^1.3.1",
"react": "^15.6.1",
"react-countup": "^2.1.1",
"react-dom": "^15.6.1",
@@ -17,13 +26,11 @@
"recharts": "^0.22.4"
},
"devDependencies": {
- "axios": "^0.16.2",
"babel-eslint": "^7.2.3",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-dva-hmr": "^0.3.2",
"babel-plugin-import": "^1.1.1",
"babel-plugin-transform-runtime": "^6.9.0",
- "babel-polyfill": "^6.23.0",
"babel-runtime": "^6.9.2",
"draftjs-to-html": "^0.7.0",
"dva-model-extend": "^0.1.1",
@@ -34,13 +41,8 @@
"eslint-plugin-import": "^2.6.1",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.1.0",
- "jsonp": "^0.2.1",
- "less-vars-to-js": "^1.1.2",
- "mockjs": "^1.0.1-beta3",
- "path-to-regexp": "^1.7.0",
- "rc-tween-one": "^1.0.0",
"redbox-react": "^1.2.10",
- "roadhog": "0.6.0-beta.6"
+ "roadhog": "1.0.0-beta.7"
},
"pre-commit": [
"lint"
diff --git a/src/components/Editor/Editor.js b/src/components/Editor/Editor.js
index 137a698..f45b7e9 100644
--- a/src/components/Editor/Editor.js
+++ b/src/components/Editor/Editor.js
@@ -1,7 +1,7 @@
import React from 'react'
import { Editor } from 'react-draft-wysiwyg'
-import styles from './Editor.less'
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'
+import styles from './Editor.less'
const DraftEditor = (props) => {
diff --git a/src/components/FilterItem/FilterItem.js b/src/components/FilterItem/FilterItem.js
index 48046a5..e2c9c08 100644
--- a/src/components/FilterItem/FilterItem.js
+++ b/src/components/FilterItem/FilterItem.js
@@ -11,7 +11,7 @@ const FilterItem = ({
{labelArray.length > 0
?
- {labelArray.map((item, index) => {item})}
+ {labelArray.map((item, index) => {item})}
: ''}
diff --git a/src/components/Layout/Bread.js b/src/components/Layout/Bread.js
index 0430d38..d91bb05 100644
--- a/src/components/Layout/Bread.js
+++ b/src/components/Layout/Bread.js
@@ -1,10 +1,11 @@
+/* global location */
import React from 'react'
import PropTypes from 'prop-types'
import { Breadcrumb, Icon } from 'antd'
import { Link } from 'dva/router'
-import styles from './Bread.less'
import pathToRegexp from 'path-to-regexp'
import { queryArray } from 'utils'
+import styles from './Bread.less'
const Bread = ({ menu }) => {
// 匹配当前路由
@@ -42,14 +43,14 @@ const Bread = ({ menu }) => {
const breads = pathArray.map((item, key) => {
const content = (
{item.icon
- ?
- : ''}{item.name}
+ ?
+ : ''}{item.name}
)
return (
{((pathArray.length - 1) !== key)
?
- {content}
+ {content}
: content}
diff --git a/src/components/Layout/Footer.js b/src/components/Layout/Footer.js
index dd754c0..50866a5 100644
--- a/src/components/Layout/Footer.js
+++ b/src/components/Layout/Footer.js
@@ -1,9 +1,9 @@
import React from 'react'
-import styles from './Footer.less'
import { config } from 'utils'
+import styles from './Footer.less'
-const Footer = () =>
+const Footer = () => (
{config.footerText}
-
+
)
export default Footer
diff --git a/src/components/Layout/Header.js b/src/components/Layout/Header.js
index b9f4686..8b13ac7 100644
--- a/src/components/Layout/Header.js
+++ b/src/components/Layout/Header.js
@@ -1,6 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Menu, Icon, Popover } from 'antd'
+import classnames from 'classnames'
import styles from './Header.less'
import Menus from './Menu'
@@ -26,18 +27,25 @@ const Header = ({ user, logout, switchSider, siderFold, isNavbar, menuPopoverVis
- :
-
+ :
+
}