merge-requests/74/head
commit
3c9ba37bfb
@ -0,0 +1,60 @@
|
||||
import React from "react";
|
||||
import { Layout, Menu, Breadcrumb } from 'antd';
|
||||
|
||||
const { Header, Content, Footer } = Layout;
|
||||
|
||||
import styles from './Dashboard.less';
|
||||
import Logo from "../../../public/images/logo.svg";
|
||||
import Login from "../Login";
|
||||
import {renderRoutes} from "react-router-config";
|
||||
import {NavLink} from "react-router-dom";
|
||||
|
||||
|
||||
class Dashboard extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
route : props.route
|
||||
}
|
||||
console.log(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Layout className="layout">
|
||||
<Header>
|
||||
<div style={{backgroundImage: "url(" + { Logo} + ")"}} className={styles.logo}/>
|
||||
<Menu
|
||||
theme="light"
|
||||
mode="horizontal"
|
||||
defaultSelectedKeys={['2']}
|
||||
style={{ lineHeight: '64px' }}
|
||||
>
|
||||
<Menu.Item key="1">nav 1</Menu.Item>
|
||||
<Menu.Item key="2">nav 2</Menu.Item>
|
||||
<Menu.Item key="3">nav 3</Menu.Item>
|
||||
</Menu>
|
||||
</Header>
|
||||
<Content style={{ padding: '0 50px' }}>
|
||||
<Breadcrumb style={{ margin: '16px 0' }}>
|
||||
<Breadcrumb.Item>Home</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>List</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>App</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
<NavLink exact to="/publisher/a" className="nav-link" >
|
||||
Items
|
||||
</NavLink>
|
||||
|
||||
{/* child routes won't render without this */}
|
||||
{renderRoutes(this.state.route.routes, { someProp: "these extra props are optional" })}
|
||||
<div style={{ background: '#fff', padding: 24, minHeight: 280 }}>Content</div>
|
||||
</Content>
|
||||
<Footer style={{ textAlign: 'center' }}>
|
||||
©2019 entgra.io
|
||||
</Footer>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Dashboard;
|
@ -0,0 +1,7 @@
|
||||
.logo {
|
||||
width: 120px;
|
||||
height: 31px;
|
||||
background: rgba(0,0,0,.2);
|
||||
margin: 16px 24px 16px 0;
|
||||
float: left;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
import React from "react";
|
||||
import { version, Button } from 'antd';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
class Dashboard extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="App">
|
||||
<p>Currentdddddd antd version: {version}</p>
|
||||
<p>Please fork this codesandbox to reproduce your issue.</p>
|
||||
<p>请 fork 这个链接来重现你碰到的问题。</p>
|
||||
<Link to="/publisher/login">login</Link>
|
||||
<Button type="primary">Hello</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Dashboard;
|
Loading…
Reference in new issue