From 6ab878061dffb3c9568ed49941745123642404c8 Mon Sep 17 00:00:00 2001 From: pmg1989 <972401854@qq.com> Date: Thu, 16 Mar 2017 14:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=A6=E4=BE=A7=E6=A0=8F?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=9C=A8key=E7=9B=B8=E5=90=8C=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E5=90=8C=E6=97=B6=E9=80=89=E4=B8=ADbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/main.less | 4 ++-- src/components/layout/menu.js | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/layout/main.less b/src/components/layout/main.less index a3cac6e..55c8604 100644 --- a/src/components/layout/main.less +++ b/src/components/layout/main.less @@ -159,9 +159,9 @@ .ant-menu-sub { height: 0; opacity: 0; - overflow: hidden; + transition: none; } - + .ant-menu-submenu-active { .ant-menu-sub { height: auto; diff --git a/src/components/layout/menu.js b/src/components/layout/menu.js index 925bdc5..ad131b4 100644 --- a/src/components/layout/menu.js +++ b/src/components/layout/menu.js @@ -4,19 +4,19 @@ import { Link } from 'dva/router' import { menu } from '../../utils' const topMenus = menu.map(item => item.key) -const getMenus = function (menuArray, siderFold, parentPath) { - parentPath = parentPath || '/' +const getMenus = function (menuArray, siderFold, parentPath = '/') { return menuArray.map(item => { + const linkTo = parentPath +item.key if (item.child) { return ( -