diff --git a/client/components/Header/Header.js b/client/components/Header/Header.js
index 8ac0b39c..9f4eddcb 100644
--- a/client/components/Header/Header.js
+++ b/client/components/Header/Header.js
@@ -1,32 +1,72 @@
import './Header.scss'
import React, { Component } from 'react'
+import PropTypes from 'prop-types'
+import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
+import { Icon } from 'antd'
+
+const ToolUser = (props)=> (
+
+ - { props.user }
+ - 消息{ props.msg.length }
+ - 退出
+
+);
+ToolUser.propTypes={
+ user:PropTypes.string.isRequired,
+ msg:PropTypes.string.isRequired
+};
+
+const ToolGuest = ()=>
+ (
+
+ );
class Header extends Component {
constructor(props) {
- super(props)
+ super(props);
}
-
render () {
+ const { login, user, msg } = this.props;
return (
)
}
}
-export default Header
+Header.propTypes={
+ user: PropTypes.string.isRequired,
+ msg: PropTypes.string.isRequired,
+ login:PropTypes.bool.isRequired
+};
+
+export default connect(
+ () => ({
+ user: "王亮",
+ msg: "暂无消息",
+ login:false
+ })
+)(Header)
+
diff --git a/client/components/Header/Header.scss b/client/components/Header/Header.scss
index b2734b7a..34a45b48 100644
--- a/client/components/Header/Header.scss
+++ b/client/components/Header/Header.scss
@@ -1,46 +1,63 @@
@import '../../styles/common.scss';
-
+$color-white : #fff;
+$color-blue : #30a1f2;
+$color-grey-deep : #929aac;
/* .header-box.css */
.header-box {
display: block;
- line-height: 64px;
+ line-height: .64rem;
background: #000c15;
font-size: 0.14rem;
-
+ color: $color-white;
+
// 内容宽度
.content {
max-width: 11rem;
margin: 0 auto;
zoom: 1;
- overflow: hidden;
+ overflow: hidden;
}
h1 {
- font-size: 0.25rem;
+ font-size: .25rem;
float: left;
- color: #FFF;
- margin: 0 20px;
+ margin: 0 .2rem;
+ color: $color-white;
}
-
- ul {
- float: left;
+ .nav-toolbar {
+ float: left;
li {
float: left;
- margin: 0 10px;
- a {
- color: #FFF;
+ margin: 0 .2rem;
+ a{
+ color: $color-white;
+ &:hover {
+ color: $color-blue;
+ }
}
}
+ }
- li:hover {
- color: #FFF;
+ .user-toolbar{
+ float: right;
+ line-height: .12rem;
+ li{
+ float: left;
+ height: .12rem;
+ margin: .26rem 0;
+ padding: 0 .1rem;
+ font-size: .12rem;
+ cursor: pointer;
+ a{
+ color: $color-white;
+ &:hover{
+ color: $color-blue;
+ }
+ }
+ &:not(:last-child){
+ border-right: .01rem solid $color-white;
+ }
}
}
-
- em {
- float: right;
- color: #929aac;
- margin: 0 20px 0 0;
- }
-}
\ No newline at end of file
+}