From 19811aa6d5635045d9e90b426f43dfc57d0c37b2 Mon Sep 17 00:00:00 2001 From: tangshaojian <63377964@qq.com> Date: Thu, 17 Apr 2025 16:25:29 +0800 Subject: [PATCH] =?UTF-8?q?tsj=EF=BC=9A=E8=A7=A3=E5=86=B3=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=A4=90=E9=A5=AE=E6=B2=B9=E7=83=9F=E5=90=8E=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E4=B8=8D=E8=83=BD=E5=93=8D=E5=BA=94=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=88=E8=A6=81=E5=AE=9E=E7=8E=B0=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E7=A9=BF=E9=80=8F=EF=BC=88pointer-events:=20none;=20?= =?UTF-8?q?=EF=BC=89=E5=85=B3=E9=94=AE=E5=9C=A8=E4=BA=8E=EF=BC=9A=20subPag?= =?UTF-8?q?eContainer=EF=BC=88=E5=89=8D=E7=AB=AF\cd-comprehensive-web\src\?= =?UTF-8?q?pages\Home=5Fv=5F2504\index.less=EF=BC=89=E8=A6=81=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=A9=BF=E9=80=8F=EF=BC=88pointer-events:=20none;=20?= =?UTF-8?q?=EF=BC=89=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SubPages/RestaurantOil/index.less | 21 ++++++++--------- .../SubPages/RestaurantOil/index.tsx | 6 ++--- src/pages/Home_v_2504/index.less | 23 ++++++++++++++----- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.less b/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.less index 26cf230d..2dbe9400 100644 --- a/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.less +++ b/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.less @@ -1,27 +1,24 @@ .container { display: flex; + // flex-direction: row; width: 100%; height: 100%; + //pointer-events: none; // Allow events to pass through container } .leftSidebar { width: 1105px; - height: 928px; -// width: 480px; -// height: 100%; - flex-shrink: 0; + // height: 100%; + // height: 928px; + pointer-events: auto; // Make the sidebar respond to events } .centerContainer { flex: 1; - height: 100%; + pointer-events: none; // Allow map events to pass through } .rightContent { - position: absolute; - width: 1105px; - height: 928px; - right: 40px; - flex-shrink: 0; -// top: 112px; -} \ No newline at end of file + margin-right: 40px; + pointer-events: auto; // Make the right content respond to events +} diff --git a/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.tsx b/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.tsx index 4bef8c71..e7a77511 100644 --- a/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.tsx +++ b/src/pages/Home_v_2504/components/SubPages/RestaurantOil/index.tsx @@ -22,17 +22,17 @@ const RestaurantOil: React.FC = ({ visible }) => { return (
- {/* 左侧内容(这里不实现,根据需求) */} + {/* 左侧内容区域 - 通过CSS设置pointer-events为auto,仅在有内容的区域启用事件 */}
{/* 左侧内容将在后续实现 */}
- {/* 中部内容(这里不实现,根据需求) */} + {/* 中间区域 - 保持pointer-events: none让地图可交互 */}
{/* 中部内容将在后续实现 */}
- {/* 右侧内容 */} + {/* 右侧内容 - 有实际内容的区域使用pointer-events: auto */}
diff --git a/src/pages/Home_v_2504/index.less b/src/pages/Home_v_2504/index.less index 45d28d68..403b1d4a 100644 --- a/src/pages/Home_v_2504/index.less +++ b/src/pages/Home_v_2504/index.less @@ -47,23 +47,30 @@ display: flex; flex-direction: column; gap: 16px; - //position: relative; + position: relative; + + // position: relative; + // z-index: 1; + // flex: 1; } .mapContainer { width: 100%; height: 705px; - background: rgb(51, 79, 121); + // background: rgb(51, 79, 121); border-radius: 20px; overflow: hidden; //flex: 2; //position: relative; - transition: flex 0.5s ease; + // transition: flex 0.5s ease; + transition: height 1s ease-in-out; // 推荐明确指定过渡属性 } .mapContainer_expand { - flex: 1; + // flex: 1; + // width: 1490px; + height: 938px; } .videoCarousel { @@ -74,7 +81,7 @@ transform: translateY(0); opacity: 1; - transition: transform 0.5s ease, opacity 0.3s ease, height 0.5s ease; + transition: transform 1s ease, opacity 1s ease, height 1s ease; } .videoCarousel_exit { @@ -100,7 +107,7 @@ transform: translateX(0); //opacity: 1; //transition: transform 0.5s ease, opacity 0.3s ease; - transition: transform 0.5s ease; + transition: transform 1s ease-in-out; z-index: 10; } @@ -110,6 +117,9 @@ } .subPageContainer { + pointer-events: none; // 允许事件穿透 + background: transparent; // 确保背景透明 + position: absolute; top: 112px; // top: 0; @@ -130,6 +140,7 @@ .subPage_active { opacity: 1; z-index: 15; + // pointer-events: auto; // 子页面自身内容需要响应事件 } .subPage_exit { -- GitLab