From 69a2f9a992f62e669f442edb885fa45b1f7c95b4 Mon Sep 17 00:00:00 2001 From: solarjoker Date: Mon, 16 Mar 2020 16:03:01 +0800 Subject: [PATCH 01/20] fix: #993 --- components/menu/SubMenu.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/menu/SubMenu.js b/components/menu/SubMenu.js index cd0b643e7..cc74c236a 100644 --- a/components/menu/SubMenu.js +++ b/components/menu/SubMenu.js @@ -10,12 +10,16 @@ class SubMenu extends Component { } checkActive (activeIndex, index) { - return activeIndex.indexOf(index) === 0 + const indexArr = index.split('-') + const activeIndexArr = activeIndex.split('-') + return activeIndexArr.slice(0, indexArr.length).join('-') === index } checkExpand (activeIndex, expandIndex, index) { return expandIndex.some(item => { - return item.indexOf(index) === 0 + const indexArr = index.split('-') + const expandIndexArr = item.split('-') + return expandIndexArr.slice(0, indexArr.length).join('-') === index }) } From 2177a499db664013c076864cba56e991a07a4070 Mon Sep 17 00:00:00 2001 From: solarjoker Date: Wed, 18 Mar 2020 15:15:42 +0800 Subject: [PATCH 02/20] fix: dropdown ui bug --- components/dropdown/DropdownMenu.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dropdown/DropdownMenu.jsx b/components/dropdown/DropdownMenu.jsx index 79f9396f5..c8b14947f 100644 --- a/components/dropdown/DropdownMenu.jsx +++ b/components/dropdown/DropdownMenu.jsx @@ -30,7 +30,7 @@ class DropdownMenu extends React.Component { placement={placement} width={width} onMouseEnter={onMouseEnter} - leftGap={1} + leftGap={0} onMouseLeave={onMouseLeave} >