fix(文书纸): 用 min-height + container-type 修正纸张高度下限与窄容器下表格溢出

This commit is contained in:
yelan
2026-09-27 14:21:24 +08:00
parent 431dd2cd6f
commit 7597b4764f
5 changed files with 43 additions and 21 deletions
+11 -1
View File
@@ -26,6 +26,8 @@
margin: 0 2px;
color: var(--brand-d);
font-weight: 600;
/* nowrap 是**编辑态胶囊**要的(原型 `.docfld` 原样):胶囊里是一句标签,不该折行。
渲染态在下面 `.filled` 里放开 —— 见那段注释,这是表格被挤坏的那个 bug 的根因。 */
white-space: nowrap;
background: var(--brand-l);
border: 1px dashed var(--brand);
@@ -58,11 +60,19 @@
所以框的颜色仍由 kind 决定(文本=--brand、签名=橙、勾选=绿)。
这圈框是文书上「这一处是系统管理的填写位」的唯一视觉标识:去掉它,
HIS 带出的值(如「患者姓名 陈志强」)与正文文字就完全分不出来(2026-09-27 已踩)。
空值同理保留框,框内是一条 `.docfld-blank` 下划线。 */
空值同理保留框,框内是一条 `.docfld-blank` 下划线。
**`white-space: normal` 是必须的**(2026-09-27 修 bug):编辑态那句 nowrap 会把
渲染态的**整块取值**也变成不可折行 —— 勾选/选择类里两个长选项(如「是(带离机构外使用、
按单次门诊处方量管理)」)于是把表格的 min-content 撑到 508px。
纸宽 820(版心 572)时刚好放得下,**窗口一窄纸被压到 708(版心 494)就溢出**:
表宽超出版心、「药品名称」那一列被压成 28px 宽的竖排(用户在窄窗口/高缩放下截的图)。
渲染态允许折行后 min-content 降到几十像素,纸再窄也放得下。 */
.docfld.filled {
padding: 1px 2px;
font-weight: 400;
cursor: default;
white-space: normal;
background: transparent;
border-style: solid;
}