From 9110660a6dcefa5314df94b322a38aee5731b293 Mon Sep 17 00:00:00 2001 From: hanyuxinting Date: Tue, 10 Dec 2024 21:02:58 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20dark=20=E6=A8=A1=E5=BC=8F=E4=B8=8Bar?= =?UTF-8?q?row=20=E6=9C=AA=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/popover/popover.scss | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/packages/popover/popover.scss b/src/packages/popover/popover.scss index 0f192edd8c..417365e7db 100644 --- a/src/packages/popover/popover.scss +++ b/src/packages/popover/popover.scss @@ -227,7 +227,18 @@ color: $popover-content-background-color; .nut-popover-arrow { - border-bottom-color: $popover-text-color; + &-top { + border-top-color: $popover-text-color; + } + &-bottom { + border-bottom-color: $popover-text-color; + } + &-left { + border-left-color: $popover-text-color; + } + &-right { + border-right-color: $popover-text-color; + } } .nut-popover-content { From 8c2dae48024780c1025d09a1b28e2638adb54db0 Mon Sep 17 00:00:00 2001 From: hanyuxinting Date: Wed, 11 Dec 2024 10:29:37 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat(Popover):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC=E9=99=90=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/popover/popover.scss | 15 +++------------ src/styles/variables.scss | 1 + 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/packages/popover/popover.scss b/src/packages/popover/popover.scss index 417365e7db..7fa429b304 100644 --- a/src/packages/popover/popover.scss +++ b/src/packages/popover/popover.scss @@ -95,6 +95,8 @@ justify-content: center; padding: $popover-menu-item-padding; border-bottom: 1px solid $popover-divider-color; + max-width: $popover-menu-item-width; + word-wrap: break-word; &:last-child { margin-bottom: 0px; @@ -227,18 +229,7 @@ color: $popover-content-background-color; .nut-popover-arrow { - &-top { - border-top-color: $popover-text-color; - } - &-bottom { - border-bottom-color: $popover-text-color; - } - &-left { - border-left-color: $popover-text-color; - } - &-right { - border-right-color: $popover-text-color; - } + border-bottom-color: $popover-text-color; } .nut-popover-content { diff --git a/src/styles/variables.scss b/src/styles/variables.scss index c1c326b1ec..627b7e90f8 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -1553,6 +1553,7 @@ $popover-menu-item-padding: var( --nutui-popover-menu-item-padding, 8px ) !default; +$popover-menu-item-width: var(--nutui-popover-menu-item-width, 160px) !default; //progress(✅) $progress-height: var(--nutui-progress-height, 10px) !default; From 6b07aff0edb9ec1df428c3b03682c74d2306fbda Mon Sep 17 00:00:00 2001 From: hanyuxinting Date: Wed, 11 Dec 2024 10:35:26 +0800 Subject: [PATCH 3/5] =?UTF-8?q?docs:=20=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/popover/doc.en-US.md | 1 + src/packages/popover/doc.md | 1 + src/packages/popover/doc.taro.md | 1 + src/packages/popover/doc.zh-TW.md | 1 + 4 files changed, 4 insertions(+) diff --git a/src/packages/popover/doc.en-US.md b/src/packages/popover/doc.en-US.md index 5344f61a68..2a40cedeef 100644 --- a/src/packages/popover/doc.en-US.md +++ b/src/packages/popover/doc.en-US.md @@ -165,3 +165,4 @@ The component provides the following CSS variables, which can be used to customi | \--nutui-popover-divider-color | The bottom border color of the options area | `$color-border` | | \--nutui-popover-disable-color | Option Disabled Colors | `$color-text-disabled` | | \--nutui-popover-menu-item-padding | The padding value of each item in the option area menu | `8px` | +| \--nutui-popover-menu-item-width | The width value of each item in the options | `160px` | diff --git a/src/packages/popover/doc.md b/src/packages/popover/doc.md index c2ee46972d..d9c18016d1 100644 --- a/src/packages/popover/doc.md +++ b/src/packages/popover/doc.md @@ -167,3 +167,4 @@ PopoverList 属性是一个由对象构成的数组,数组中的每个对象 | \--nutui-popover-divider-color | 选项区的底部 border 颜色 | `$color-border` | | \--nutui-popover-disable-color | 选项禁用的颜色 | `$color-text-disabled` | | \--nutui-popover-menu-item-padding | 选项区菜单每一项的 padding 值 | `8px` | +| \--nutui-popover-menu-item-width | 选项区菜单每一项宽度值,超过宽度值后,会折行展示,保障信息的完整性 | `160px` | diff --git a/src/packages/popover/doc.taro.md b/src/packages/popover/doc.taro.md index ae32d86afa..0eca49b5e2 100644 --- a/src/packages/popover/doc.taro.md +++ b/src/packages/popover/doc.taro.md @@ -158,3 +158,4 @@ PopoverList 属性是一个由对象构成的数组,数组中的每个对象 | \--nutui-popover-divider-color | 选项区的底部 border 颜色 | `$color-border` | | \--nutui-popover-disable-color | 选项禁用的颜色 | `$color-text-disabled` | | \--nutui-popover-menu-item-padding | 选项区菜单每一项的 padding 值 | `8px` | +| \--nutui-popover-menu-item-width | 选项区菜单每一项宽度值,超过宽度值后,会折行展示,保障信息的完整性 | `160px` | diff --git a/src/packages/popover/doc.zh-TW.md b/src/packages/popover/doc.zh-TW.md index 6e79010b9b..4b6ab3f765 100644 --- a/src/packages/popover/doc.zh-TW.md +++ b/src/packages/popover/doc.zh-TW.md @@ -167,3 +167,4 @@ PopoverList 屬性是一個由對象構成的數組,數組中的每個對象 | \--nutui-popover-divider-color | 選項區的底部 border 顏色 | `$color-border` | | \--nutui-popover-disable-color | 選項禁用的顏色 | `$color-text-disabled` | | \--nutui-popover-menu-item-padding | 選項區菜單每一項的 padding 值 | `8px` | +| \--nutui-popover-menu-item-width | 選項區菜單每一項宽度值,超过宽度值后,会折行展示,保障信息的完整性 | `160px` | From ea94cc32bf71183709f60a0ecd85651741bdd5a7 Mon Sep 17 00:00:00 2001 From: hanyuxinting Date: Wed, 11 Dec 2024 13:47:03 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/popover/doc.zh-TW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/popover/doc.zh-TW.md b/src/packages/popover/doc.zh-TW.md index 4b6ab3f765..8dfac8902c 100644 --- a/src/packages/popover/doc.zh-TW.md +++ b/src/packages/popover/doc.zh-TW.md @@ -167,4 +167,4 @@ PopoverList 屬性是一個由對象構成的數組,數組中的每個對象 | \--nutui-popover-divider-color | 選項區的底部 border 顏色 | `$color-border` | | \--nutui-popover-disable-color | 選項禁用的顏色 | `$color-text-disabled` | | \--nutui-popover-menu-item-padding | 選項區菜單每一項的 padding 值 | `8px` | -| \--nutui-popover-menu-item-width | 選項區菜單每一項宽度值,超过宽度值后,会折行展示,保障信息的完整性 | `160px` | +| \--nutui-popover-menu-item-width | 選項區菜單每一項寬度值,超過寬度值後,會折行展示,保障信息的完整性 | `160px` | From f923be9597c44dfa479f5b0f7e5bcd8dc1fda25c Mon Sep 17 00:00:00 2001 From: hanyuxinting Date: Wed, 11 Dec 2024 18:42:13 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=BD=E5=BA=A6?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/popover/popover.scss | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/packages/popover/popover.scss b/src/packages/popover/popover.scss index 7fa429b304..3c0fc7df1c 100644 --- a/src/packages/popover/popover.scss +++ b/src/packages/popover/popover.scss @@ -103,12 +103,6 @@ border-bottom: none; } - // &:hover:not(:only-child) { - // cursor: pointer; - // color: $popover-hover-text-color; - // background-color: $popover-hover-background-color; - // } - &:hover:nth-of-type(2) { border-radius: 8px 8px 0px 0px; } @@ -132,9 +126,10 @@ } &-name { - width: 100%; + width: calc(100% - 34px); word-break: keep-all; margin: 0 6px 0 4px; + flex: 1; } &-action-icon { @@ -174,7 +169,6 @@ &-top-start { left: 0; - .nut-popover-arrow-top-start { left: 16px; transform: translateX(0%); @@ -190,7 +184,6 @@ &-bottom-end { right: 0; - .nut-popover-arrow-bottom-end { right: 16px; transform: translateX(0%); @@ -199,7 +192,6 @@ &-bottom-start { left: 0; - .nut-popover-arrow-bottom-start { left: 16px; transform: translateX(0%);