diff --git a/src/components/GlobalHeader/index.js b/src/components/GlobalHeader/index.js index 222002c288f9f1d918adaf2afa6b1917199630af..f7da5f32ba4de8917d948f0cbc52d5dec12ef85d 100644 --- a/src/components/GlobalHeader/index.js +++ b/src/components/GlobalHeader/index.js @@ -4,8 +4,8 @@ import moment from 'moment'; import groupBy from 'lodash/groupBy'; import Debounce from 'lodash-decorators/debounce'; import { Link } from 'dva/router'; -import NoticeIcon from '../../components/NoticeIcon'; -import HeaderSearch from '../../components/HeaderSearch'; +import NoticeIcon from '../NoticeIcon'; +import HeaderSearch from '../HeaderSearch'; import styles from './index.less'; const { Header } = Layout; diff --git a/src/routes/Dashboard.css b/src/routes/Dashboard.css deleted file mode 100644 index 3f7685d10fba7e0ce78b310088ccf47a731ba871..0000000000000000000000000000000000000000 --- a/src/routes/Dashboard.css +++ /dev/null @@ -1,5 +0,0 @@ -.normal { - font-family: Georgia, sans-serif; - margin-top: 3em; - text-align: center; -} diff --git a/src/routes/Dashboard.js b/src/routes/Dashboard.js deleted file mode 100644 index 1e9bc820f85e5a7d100bbe5e2e7d9322fa95ed12..0000000000000000000000000000000000000000 --- a/src/routes/Dashboard.js +++ /dev/null @@ -1,101 +0,0 @@ -import React, { PureComponent } from 'react'; -import { connect } from 'dva'; -import { Row, Col, Card, Table, Icon, Divider } from 'antd'; - -const columns = [{ - title: 'Name', - dataIndex: 'name', - key: 'name', -}, { - title: 'Age', - dataIndex: 'age', - key: 'age', -}, { - title: 'Address', - dataIndex: 'address', - key: 'address', -}, { - title: 'Action', - key: 'action', - render: (text, record) => ( - - Action 一 {record.name} - - Delete - - - More actions - - - ), -}]; - -class Dashboard extends PureComponent { - componentDidMount() { - this.props.dispatch({ - type: 'user/fetch', - }); - } - render() { - const { user: { list }, loading } = this.props; - return ( -
- - - -

卡片内容

-

卡片内容

-

卡片内容

-
- - - -

卡片内容

-

卡片内容

-

卡片内容

-
- - - -

卡片内容

-

卡片内容

-

卡片内容

-
- -
- - - -

卡片内容

-

卡片内容

-

卡片内容

-
- - - -

卡片内容

-

卡片内容

-

卡片内容

-
- -
- - - } - > - - - - - - ); - } -} - -export default connect(({ user, loading }) => ({ - user, - loading: loading.effects['user/fetch'], -}))(Dashboard); diff --git a/src/routes/Dashboard.test.js b/src/routes/Dashboard.test.js deleted file mode 100644 index 51605602243e054ba534e4891f5ffe451626f56a..0000000000000000000000000000000000000000 --- a/src/routes/Dashboard.test.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import Dashboard from './Dashboard'; - -it('renders Dashboard', () => { - const fetchFn = jest.fn(); - const wrapper = shallow( - - ); - expect(wrapper.find('Table').props().dataSource).toEqual([]); - expect(fetchFn).toBeCalled(); -});