From 66e07289571571d79dcff5c2e162e015c63dfa93 Mon Sep 17 00:00:00 2001 From: yueli Date: Mon, 14 Sep 2026 11:05:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(stocktake):=20=E6=AC=A2=E8=BF=8E=E9=A1=B5?= =?UTF-8?q?=E8=A1=A5=E8=B6=B3=E4=B8=8A=E4=B8=8B=E5=AE=89=E5=85=A8=E8=BE=B9?= =?UTF-8?q?=E8=B7=9D=EF=BC=8C=E6=98=BE=E5=BC=8F=E5=8E=8B=E8=BF=87=20el-car?= =?UTF-8?q?d=20=E7=9A=84=20overflow:hidden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 b7cdd5e 的 min-height:0 基础上补两处: 1. 顶部安全边距缺失:内容超高时 .idle-content 的 margin:auto 会塌缩为 0, 文字直接贴着屏幕顶端。改用**容器自身的 padding: 40px 0** —— padding 不参与 auto 塌缩,滚到顶/底都稳定保留 40px 呼吸空间。 2. 显式声明两轴 overflow:Element Plus 的 .el-card 默认 `overflow: hidden` (实测其 dist/index.css 确有该声明)。原先只写 overflow-y: auto, 虽然 scoped 选择器(.idle-card[data-v-x],特异性 0,2,0)能压过 .el-card(0,1,0),但意图不够显式。改为 `overflow: hidden auto` 一次写清 「横向裁掉、纵向可滚」。 实测 style 块编译通过(12799 字符),min-height:0 / padding:40px 0 / overflow:hidden auto / margin:auto 均已进入产物。 --- inventory-web/src/views/stock/stocktake/index.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/inventory-web/src/views/stock/stocktake/index.vue b/inventory-web/src/views/stock/stocktake/index.vue index 6c0eba5..0fa8e2c 100644 --- a/inventory-web/src/views/stock/stocktake/index.vue +++ b/inventory-web/src/views/stock/stocktake/index.vue @@ -1870,9 +1870,16 @@ const goToVarianceReview = () => { text-align: center; border: none; border-radius: 0; - overflow-y: auto; + /* 显式写全 overflow 两轴:.el-card 默认 overflow:hidden, + 这里用 scoped 选择器(.idle-card[data-v-x],特异性 0,2,0)压过它, + 明确声明「横向裁掉、纵向可滚」 */ + overflow: hidden auto; -webkit-overflow-scrolling: touch; /* 平板/iOS 惯性滚动 */ - padding-bottom: 40px; /* 底部留白,按钮不贴屏幕边缘 */ + /* ★ 上下各留 40px 安全边距。用 padding 而不是子元素 margin: + margin:auto 在内容超高时会塌缩为 0,导致文字紧贴屏幕顶端; + 容器自身的 padding 则始终保留,滚到顶/底都有呼吸空间 */ + padding: 40px 0; + box-sizing: border-box; } .idle-content { width: 100%; max-width: 400px; padding: 20px; margin: auto; } /* 抽盘配置区是双栏,窄容器装不下,此时放宽欢迎页 */