From b781d9d4c8ce31daf0893a813ad02f0b44379317 Mon Sep 17 00:00:00 2001 From: zuiidea Date: Mon, 28 Nov 2016 23:59:53 +0800 Subject: [PATCH] switchSIder --- src/components/Layout/Header.jsx | 12 ++++++------ src/components/layout/main.less | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/components/Layout/Header.jsx b/src/components/Layout/Header.jsx index c9cf68a..369041e 100644 --- a/src/components/Layout/Header.jsx +++ b/src/components/Layout/Header.jsx @@ -1,18 +1,18 @@ import React, { PropTypes } from 'react' -import { Menu, Icon } from 'antd' +import { Menu, Icon, Button } from 'antd' import { Link } from 'dva/router' import styles from './main.less' const SubMenu = Menu.SubMenu function Header({ location, user, logout }) { - function handleClickMenu(item) { - if (item.key === 'logout') { - logout() - } - } + let handleClickMenu = e => e.key === 'logout' && logout() + let switchSider = () => {} return (
+
+ +
{user.name}} diff --git a/src/components/layout/main.less b/src/components/layout/main.less index 9b23ea1..885202b 100644 --- a/src/components/layout/main.less +++ b/src/components/layout/main.less @@ -43,6 +43,21 @@ border: none; } box-shadow: 0 0 20px rgba(0, 0, 0, 0.05); + position: relative; + .siderbutton{ + height: 47px; + width: 47px; + line-height: 47px; + text-align: center; + font-size: 18px; + cursor: pointer; + position: absolute; + transition: @transition-ease-in; + &:hover{ + color: @primary-color; + background-color: fade(@primary-color, 15%); + } + } } .bread {