Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0

This commit is contained in:
zuiidea
2017-01-10 14:14:12 +08:00
3 changed files with 12 additions and 3 deletions
+9 -1
View File
@@ -106,6 +106,13 @@
transition: @transition-ease-out;
}
}
.siderMenu {
position: absolute;
width: 100%;
max-height: ~"calc(100% - 88px)"; // https://github.com/less/less.js/issues/974
overflow-y: scroll;
}
.switchtheme {
width: 100%;
@@ -118,7 +125,8 @@
align-items: center;
padding: 0 16px 0 24px;
overflow: hidden;
z-index: 1000;
span {
white-space: nowrap;
overflow: hidden;
+2 -1
View File
@@ -26,10 +26,11 @@ const getMenus = function (menuArray, siderFold, parentPath) {
})
}
function Menus ({ siderFold, darkTheme, location, isNavbar, handleClickNavMenu }) {
function Menus ({ siderFold, darkTheme, location, isNavbar, handleClickNavMenu, className }) {
const menuItems = getMenus(menu, siderFold)
return (
<Menu
className={className}
mode={siderFold ? 'vertical' : 'inline'}
theme={darkTheme ? 'dark' : 'light'}
onClick={handleClickNavMenu}
+1 -1
View File
@@ -16,7 +16,7 @@ function Sider ({ siderFold, darkTheme, location, changeTheme }) {
<img src={config.logoSrc} />
{siderFold ? '' : <span>{config.logoText}</span>}
</div>
<Menus {...menusProps} />
<Menus {...menusProps} className={styles.siderMenu} />
{!siderFold ? <div className={styles.switchtheme}>
<span><Icon type='bulb' />切换主题</span>
<Switch onChange={changeTheme} defaultChecked={darkTheme} checkedChildren='黑' unCheckedChildren='白' />