From 941cd64252242b09fb0e27d23c50bd9131362f65 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Mon, 19 Oct 2026 22:14:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A2=98=E7=9B=AE):=20=E9=A2=98=E9=9D=A2?= =?UTF-8?q?=E3=80=8C=E4=BD=A0=E7=94=BB=E7=9A=84=E6=B5=81=E7=A8=8B=E5=9B=BE?= =?UTF-8?q?=E3=80=8D=E7=BC=A9=E7=95=A5=E5=9B=BE=E5=8F=AA=E9=9C=B2=E5=87=BA?= =?UTF-8?q?=E4=B8=AD=E9=97=B4=E4=B8=80=E6=88=AA=EF=BC=8C=E8=A6=81=E4=B8=8A?= =?UTF-8?q?=E4=B8=8B=E6=BB=9A=E6=89=8D=E7=9C=8B=E5=BE=97=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pele 在图上写了内联的 height: auto,盖掉了按框高缩小的样式,图按原尺寸塞进 150px 的框。 Co-Authored-By: Claude Opus 5.5 --- apps/web/src/oj/problem/components/MyFlowchart.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/web/src/oj/problem/components/MyFlowchart.vue b/apps/web/src/oj/problem/components/MyFlowchart.vue index 16875e9..79bc26d 100644 --- a/apps/web/src/oj/problem/components/MyFlowchart.vue +++ b/apps/web/src/oj/problem/components/MyFlowchart.vue @@ -57,12 +57,17 @@ watch( min-height: 0; height: 150px; align-items: center; + overflow: hidden; } -/* 缩略图按高度缩:流程图一般是竖长的,按宽度铺满的话 150px 里只看得见开头两个框 */ +/* + * 缩略图按高度缩:流程图一般是竖长的,按宽度铺满的话 150px 里只看得见开头两个框。 + * 要 !important:pele 在 上写了内联的 max-width: 100%; height: auto,不压住的话图按原尺寸 + * (比大小那张 581px 高)塞进 150px 的框里,只露出中间一截 + */ :deep(.flowchart-container.compact > svg) { - width: auto; - max-width: 100%; - height: 100%; + width: auto !important; + max-width: 100% !important; + height: 100% !important; }