From 0716d1498f63fb2d6c9af39a2ad11d2d028e0fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Wed, 15 Apr 2020 23:00:51 +0800 Subject: [PATCH] fix: Dropdown submenu background (#23296) * :bug: Fix Dropdown submenu background close #23293 * remove unused code --- components/dropdown/style/index.less | 2 + .../__tests__/__snapshots__/demo.test.js.snap | 38 +++++++++---------- components/menu/demo/horizontal.md | 10 ++--- components/menu/style/index.less | 4 -- components/menu/style/rtl.less | 9 ----- 5 files changed, 22 insertions(+), 41 deletions(-) diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less index 825679b5de..182d038ce4 100644 --- a/components/dropdown/style/index.less +++ b/components/dropdown/style/index.less @@ -68,6 +68,8 @@ &-submenu-popup { position: absolute; z-index: @zindex-dropdown; + background: transparent; + box-shadow: none; > .@{dropdown-prefix-cls}-menu { transform-origin: 0 0; diff --git a/components/menu/__tests__/__snapshots__/demo.test.js.snap b/components/menu/__tests__/__snapshots__/demo.test.js.snap index 7d27c859a1..eac16ab861 100644 --- a/components/menu/__tests__/__snapshots__/demo.test.js.snap +++ b/components/menu/__tests__/__snapshots__/demo.test.js.snap @@ -126,30 +126,26 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = ` role="button" > - - Navigation Three - Submenu + + + Navigation Three - Submenu diff --git a/components/menu/demo/horizontal.md b/components/menu/demo/horizontal.md index 5faa46b665..33da36a9fd 100755 --- a/components/menu/demo/horizontal.md +++ b/components/menu/demo/horizontal.md @@ -15,11 +15,7 @@ Horizontal top navigation menu. ```jsx import { Menu } from 'antd'; -import { - MailOutlined, - AppstoreOutlined, - SettingOutlined, -} from '@ant-design/icons'; +import { MailOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons'; const { SubMenu } = Menu; @@ -48,10 +44,10 @@ class App extends React.Component { + <> Navigation Three - Submenu - + } > diff --git a/components/menu/style/index.less b/components/menu/style/index.less index ca939eb5a9..883d8c1d7e 100644 --- a/components/menu/style/index.less +++ b/components/menu/style/index.less @@ -210,10 +210,6 @@ z-index: @zindex-dropdown; border-radius: @border-radius-base; - .submenu-title-wrapper { - padding-right: 20px; - } - &::before { position: absolute; top: -7px; diff --git a/components/menu/style/rtl.less b/components/menu/style/rtl.less index c5b26dab5f..f3f4d6bba6 100644 --- a/components/menu/style/rtl.less +++ b/components/menu/style/rtl.less @@ -56,15 +56,6 @@ } &-submenu { - &-popup { - .submenu-title-wrapper { - .@{menu-prefix-cls}-submenu-rtl& { - padding-right: 0; - padding-left: 20px; - } - } - } - &-vertical, &-vertical-left, &-vertical-right,