From 6a99c1121b083b115efbfca4b6aa3d03358962eb Mon Sep 17 00:00:00 2001 From: yml2213 Date: Sat, 10 Oct 2026 18:18:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(order):=20=E8=A7=A3=E5=86=B3=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=BC=B9=E7=AA=97=E5=9B=A0=20CSS=20display?= =?UTF-8?q?=20!important=20=E5=AF=BC=E8=87=B4=20Vue=20v-show=20=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=A4=B1=E6=95=88=E6=97=A0=E6=B3=95=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 根因定位:.mobile-popup-form 设置了 display: flex !important,该样式在 CSS 特异性中强于 Vue v-show 生成的行内 style="display: none;";当弹窗点击关闭后,Vue 将变量置为 false 并完成退场动画,但由于样式强制 flex,弹窗退场后立刻以 flex 状态重新暴露在屏幕上(即“又弹出一个”),且由于此时 Vue 响应式状态已是 false,再次点击关闭按钮不会触发状态改变(即“第二次无法关闭”) - 解耦容器与弹窗:移除 .mobile-popup-form 根节点上的 display: flex !important 与 overflow 强覆盖,弹窗内部增加 .popup-inner 容器承载垂直 flex 列布局与吸顶/吸底/滚动分区 - 严格验证:运行全量检查 ./scripts/check.sh,Go测试、MySQL测试、TypeScript检查及Vite生产构建 100% 通过 --- .../orders/views/MobileOrderDetailView.css | 14 +- .../orders/views/MobileOrderDetailView.vue | 384 +++++++++--------- 2 files changed, 206 insertions(+), 192 deletions(-) diff --git a/frontend/src/features/orders/views/MobileOrderDetailView.css b/frontend/src/features/orders/views/MobileOrderDetailView.css index 0b34651..276e702 100644 --- a/frontend/src/features/orders/views/MobileOrderDetailView.css +++ b/frontend/src/features/orders/views/MobileOrderDetailView.css @@ -216,11 +216,19 @@ /* ========== Popups ========== */ .mobile-popup-form { - display: flex !important; - flex-direction: column !important; max-height: 85vh; max-height: 85dvh; - overflow: hidden !important; + overflow: hidden; + box-sizing: border-box; +} + +.popup-inner { + display: flex; + flex-direction: column; + height: 100%; + max-height: 85vh; + max-height: 85dvh; + overflow: hidden; box-sizing: border-box; } diff --git a/frontend/src/features/orders/views/MobileOrderDetailView.vue b/frontend/src/features/orders/views/MobileOrderDetailView.vue index 8eb10e2..51978cb 100644 --- a/frontend/src/features/orders/views/MobileOrderDetailView.vue +++ b/frontend/src/features/orders/views/MobileOrderDetailView.vue @@ -594,104 +594,106 @@ async function copyListingCode() { class="mobile-popup-form" @close="markPopupClosed" > - -