forked from nelsonkuang/ant-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
51 lines (48 loc) · 1.41 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import React, { Component } from 'react'
import { Layout } from 'antd'
import RootHeader from './components/layout/RootHeader'
import { SiderMenusRoute, RootBreadcrumbRoute, ContentRoute } from './routes'
import './App.css'
const { Footer, Content, Sider } = Layout
class App extends Component {
state = {
collapsed: false
}
onCollapse = collapsed => {
this.setState({ collapsed })
}
render() {
return (
<Layout style={{ minHeight: '100vh' }}>
<RootHeader />
<Layout style={{ paddingTop: '64px' }}>
<Sider
width={200}
style={{ background: '#333' }}
collapsible
collapsed={this.state.collapsed}
onCollapse={this.onCollapse}
className="fixed"
>
<SiderMenusRoute />
</Sider>
<Layout
className={this.state.collapsed ? 'content-normal' : 'content-max'}
>
<RootBreadcrumbRoute />
<Content style={{ margin: 0, minHeight: 280 }}>
<ContentRoute />
</Content>
<Footer style={{ textAlign: 'center' }}>
<a href="https://github.com/nelsonkuang/ant-admin">
Fork me on Github
</a>
, Mixed by Nelson Kuang @2017, currently under developing...
</Footer>
</Layout>
</Layout>
</Layout>
)
}
}
export default App