From 21ed4d9548817472bf0f5d56ea0ddb2660ca8953 Mon Sep 17 00:00:00 2001 From: Wugaoliang Date: Wed, 16 Dec 2020 10:33:45 +0800 Subject: [PATCH 1/3] feat: #1437 --- components/tabs/ItemDropdown.js | 39 ++++++++++++++++---------------- components/tabs/style/index.scss | 20 +++++++++++----- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/components/tabs/ItemDropdown.js b/components/tabs/ItemDropdown.js index ddb880318..5f6b38319 100644 --- a/components/tabs/ItemDropdown.js +++ b/components/tabs/ItemDropdown.js @@ -79,27 +79,28 @@ class ItemDropdown extends Component { attachEle={this.toggleRef} zIndex={1010} width="auto" - leftGap={-18} topGap={3} > -
- {items.map((item, index) => { - return ( -
{ - this.toggle() - onChoose(item, e) - }} - key={index} - > - {item.tabTitle} -
- ) - })} +
+
    + {items.map((item, index) => { + return ( +
  • { + this.toggle() + onChoose(item, e) + }} + key={index} + > + {item.tabTitle} +
  • + ) + })} +
diff --git a/components/tabs/style/index.scss b/components/tabs/style/index.scss index 0cba6d175..8873677dc 100644 --- a/components/tabs/style/index.scss +++ b/components/tabs/style/index.scss @@ -394,18 +394,26 @@ $prefix: 'hi-tabs' !default; } .hi-tabs-dropdown { + &__wrapper { + max-height: 174px; + padding: 8px 0; + overflow: auto; + background-color: use-color('white'); + border-radius: 2px; + border: 1px solid use-color('gray-20'); + box-shadow: 0 2px 8px 0 rgba(56, 62, 71, 0.1); + } + &__toggle-title { margin-right: 8px; } &__items { - max-height: 160px; - padding: 4px 0; + max-height: 158px; + list-style: none; + margin: 0; + padding: 0; overflow: auto; - background-color: use-color('white'); - border-radius: 2px; - border: 1px solid use-color('gray-20'); - box-shadow: 0 2px 8px 0 rgba(56, 62, 71, 0.1); } &__item { From a8687d9c187d1b5d209a080c64bdd3950fba9e63 Mon Sep 17 00:00:00 2001 From: Wugaoliang Date: Wed, 16 Dec 2020 10:34:48 +0800 Subject: [PATCH 2/3] feat: #1437 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c41c2b33a..acfe95c83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - 修复 `DatePicker` 在 type 为 daterange 时候,传入不合法日期,面板显示异常 [#1418](https://github.com/XiaoMi/hiui/issues/1418) - 修复 `Table` 对其他组件造成的样式污染问题 [#1428](https://github.com/XiaoMi/hiui/issues/1428) - 修复 `Tree` onDrop 回调函数参数不正确的问题 [#1425](https://github.com/XiaoMi/hiui/issues/1425) +- 优化 `Tabs` 组件弹出层样式[#1437](https://github.com/XiaoMi/hiui/issues/1437) ## 3.2.0 From 915ecd8ed518c2d123093c2d5777395c0bda9395 Mon Sep 17 00:00:00 2001 From: Wugaoliang Date: Wed, 16 Dec 2020 10:38:00 +0800 Subject: [PATCH 3/3] feat: #1437 --- components/tabs/style/index.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tabs/style/index.scss b/components/tabs/style/index.scss index 8873677dc..6aa5eb597 100644 --- a/components/tabs/style/index.scss +++ b/components/tabs/style/index.scss @@ -395,7 +395,7 @@ $prefix: 'hi-tabs' !default; .hi-tabs-dropdown { &__wrapper { - max-height: 174px; + max-height: 178px; padding: 8px 0; overflow: auto; background-color: use-color('white'); @@ -409,7 +409,7 @@ $prefix: 'hi-tabs' !default; } &__items { - max-height: 158px; + max-height: 162px; list-style: none; margin: 0; padding: 0;