From 481999f963f2074a2dbd7a9063a21f11b28602f0 Mon Sep 17 00:00:00 2001 From: KQL Date: Mon, 8 Sep 2025 05:29:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9D=A2=E8=AF=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=E6=8B=89=E6=A0=8F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将下拉栏定位从absolute改为fixed - 修复位置计算,使用像素单位(px) - 下拉栏居中显示在按钮下方 - 添加最大高度限制防止内容过长 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../components/InterviewStatusDropdown/index.css | 3 ++- .../components/InterviewStatusDropdown/index.jsx | 2 +- src/pages/CompanyJobsPage/index.jsx | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.css b/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.css index 41b8106..5defb5a 100644 --- a/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.css +++ b/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.css @@ -9,7 +9,7 @@ } .interview-status-dropdown { - position: absolute; + position: fixed; background: white; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); @@ -17,6 +17,7 @@ z-index: 1000; animation: slideDown 0.3s ease-out; overflow: hidden; + max-height: 500px; } @keyframes slideDown { diff --git a/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.jsx b/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.jsx index 7f7aa69..53208b7 100644 --- a/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.jsx +++ b/src/pages/CompanyJobsPage/components/InterviewStatusDropdown/index.jsx @@ -63,7 +63,7 @@ export default ({ status, statusText, isOpen, onClose, position }) => { return ( <>
-
+

{statusText}

diff --git a/src/pages/CompanyJobsPage/index.jsx b/src/pages/CompanyJobsPage/index.jsx index 70e870d..cfa0e69 100644 --- a/src/pages/CompanyJobsPage/index.jsx +++ b/src/pages/CompanyJobsPage/index.jsx @@ -128,9 +128,15 @@ const CompanyJobsPage = () => { const handleStatusClick = (e, item) => { e.stopPropagation(); const rect = e.currentTarget.getBoundingClientRect(); + + // 计算下拉栏位置,让它在按钮下方居中 + const dropdownWidth = 360; + const buttonCenter = rect.left + rect.width / 2; + const left = Math.max(10, buttonCenter - dropdownWidth / 2); + setDropdownPosition({ top: rect.bottom + 5, - left: rect.left + left: left }); setSelectedInterview(item); setDropdownOpen(true);