From 786caa19c4a784dbc28ac877a5b99335203d49be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E9=87=8E?= Date: Fri, 5 Dec 2025 22:42:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=83=8C=E6=99=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Picker/index.module.scss | 39 +++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/components/Picker/index.module.scss b/src/components/Picker/index.module.scss index 2b2d946..8d83607 100644 --- a/src/components/Picker/index.module.scss +++ b/src/components/Picker/index.module.scss @@ -1,4 +1,39 @@ .picker-container { + position: relative; + + // 使用包装元素的伪元素创建渐变遮罩 + &::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 20%; + background: linear-gradient( + to bottom, + #fafafa, + transparent + ); + pointer-events: none; + z-index: 9999; + } + + &::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 20%; + background: linear-gradient( + to top, + #fafafa, + transparent + ); + pointer-events: none; + z-index: 9999; + } + :global { .nut-popup-round { position: relative !important; @@ -7,7 +42,7 @@ display: none !important; } - .nut-picker { + .nut-picker { &::after { content: ""; position: absolute; @@ -16,7 +51,7 @@ right: 16px !important; width: calc(100% - 32px); height: 48px; - background: rgba(0, 0, 0, 0.02); + background: rgba(22, 24, 35, 0.05); transform: translateY(-50%); border-radius: 4px; pointer-events: none;