提交 eaa3190c authored 作者: vipcxj's avatar vipcxj

1.利用alias统一dva和dva-react-router-3

2.删除没用到的react-sizeme库
上级 807600cc
...@@ -15,6 +15,9 @@ const resource_proxy = { ...@@ -15,6 +15,9 @@ const resource_proxy = {
}; };
module.exports = { module.exports = {
alias: {
"dva": "dva-react-router-3"
},
entry: "src/index.js", entry: "src/index.js",
html: { html: {
template: "src/index.ejs", template: "src/index.ejs",
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
"react": "^16.2.0", "react": "^16.2.0",
"react-dom": "^16.2.0", "react-dom": "^16.2.0",
"react-json-view": "^1.11.4", "react-json-view": "^1.11.4",
"react-sizeme": "^2.3.4",
"resolve-pathname": "^2.1.0", "resolve-pathname": "^2.1.0",
"uuid": "^3.1.0", "uuid": "^3.1.0",
"word-wrap": "^1.2.3", "word-wrap": "^1.2.3",
......
import { routerRedux } from 'dva-react-router-3/router'; import { routerRedux } from 'dva/router';
import { authorize, login, userInfo } from '../services/login'; import { authorize, login, userInfo } from '../services/login';
import { validate as passValidate } from '../services/login/password'; import { validate as passValidate } from '../services/login/password';
import { requestCode, validate as ucaValidate } from '../services/login/uca'; import { requestCode, validate as ucaValidate } from '../services/login/uca';
......
import { routerRedux } from 'dva-react-router-3/router'; import { routerRedux } from 'dva/router';
import isString from 'lodash/isString'; import isString from 'lodash/isString';
import { logout } from '../../services/main'; import { logout } from '../../services/main';
import { fetchDomains, switchDomain, currentDomain } from '../../services/domain'; import { fetchDomains, switchDomain, currentDomain } from '../../services/domain';
......
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Router } from 'dva-react-router-3/router'; import { Router } from 'dva/router';
import isString from 'lodash/isString'; import isString from 'lodash/isString';
import get from 'lodash/get'; import get from 'lodash/get';
import config from './utils/config'; import config from './utils/config';
......
...@@ -2,7 +2,7 @@ import React from 'react'; ...@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Menu, Breadcrumb, Icon } from 'antd'; import { Menu, Breadcrumb, Icon } from 'antd';
import { connect } from 'dva'; import { connect } from 'dva';
import { Link } from 'dva-react-router-3/router'; import { Link } from 'dva/router';
import styles from './header.less'; import styles from './header.less';
const SubMenu = Menu.SubMenu; const SubMenu = Menu.SubMenu;
......
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { connect } from 'dva'; import { connect } from 'dva';
import { withRouter } from 'dva-react-router-3/router'; import { withRouter } from 'dva/router';
import { Layout } from 'antd'; import { Layout } from 'antd';
import SiderLogo from '../../components/layout/sider/SiderLogo'; import SiderLogo from '../../components/layout/sider/SiderLogo';
import SiderMenu from '../../components/layout/sider/SiderMenu'; import SiderMenu from '../../components/layout/sider/SiderMenu';
......
import { connect } from 'dva'; import { connect } from 'dva';
import { withRouter } from 'dva-react-router-3/router'; import { withRouter } from 'dva/router';
import List from './list'; import List from './list';
import Detail from './detail'; import Detail from './detail';
import route from '../../../../components/hoc/routes'; import route from '../../../../components/hoc/routes';
......
import { browserHistory } from 'dva-react-router-3/router'; import { browserHistory } from 'dva/router';
import resolvePathname from 'resolve-pathname'; import resolvePathname from 'resolve-pathname';
import isString from 'lodash/isString'; import isString from 'lodash/isString';
import config from '../utils/config'; import config from '../utils/config';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论