From 75c165c83fc31493214e4bf24fe60d40ce9c5a0a Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Sat, 12 Sep 2020 18:35:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20the=20shake=20problem=20of=20head=20menu?= =?UTF-8?q?=20when=20mouse=20hover;=20:bug:=20#115=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=9A=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5=E6=97=B6=E9=A1=B6?= =?UTF-8?q?=E9=83=A8=E8=8F=9C=E5=8D=95=E6=8A=96=E5=8A=A8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/replacer/resolve.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/config/replacer/resolve.config.js b/src/config/replacer/resolve.config.js index 662be2d..6159da4 100644 --- a/src/config/replacer/resolve.config.js +++ b/src/config/replacer/resolve.config.js @@ -37,6 +37,12 @@ const cssResolve = { return cssObj.toText() } }, + '.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-item-open,.ant-menu-horizontal>.ant-menu-item-selected,.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-submenu-active,.ant-menu-horizontal>.ant-menu-submenu-open,.ant-menu-horizontal>.ant-menu-submenu-selected,.ant-menu-horizontal>.ant-menu-submenu:hover': { + resolve(cssText, cssObj) { + cssObj.selector = cssObj.selector.replace(/.ant-menu-horizontal/g, '.ant-menu-horizontal:not(.ant-menu-dark)') + return cssObj.toText() + } + }, '.ant-layout-sider': { resolve(cssText, cssObj) { cssObj.selector = '.ant-layout-sider-dark'