diff --git a/src/shell/amis-theme.css b/src/shell/amis-theme.css index 59c3930..c823f2b 100644 --- a/src/shell/amis-theme.css +++ b/src/shell/amis-theme.css @@ -449,3 +449,14 @@ .amis-scope .AMISCSSWrapper { --Form-input-fontSize: 13px; /* 与表格正文 13px 一致(原 14px) */ } + +/* ============================================================================ + 14. 查看(只读/静态)态隐藏必填星号 * — 2026-06-15 + 只读页的红 * 无意义(不可填、不校验)。静态渲染的必填项 value 部分是静态文本、 + 无输入控件(实测 .cxd-Form-value 内为 .cxd-TplField,无 input),据此 :has 判定 + 后隐藏 *;编辑态必填项 value 含 input/textarea/Select → 不命中,* 照常显示。 + (实测查看 5★全隐、修改 5★全显。) + ============================================================================ */ +.amis-scope .cxd-Form-item.is-required:not(:has(.cxd-Form-value input, .cxd-Form-value textarea, .cxd-Form-value .cxd-Select)) .cxd-Form-star { + display: none; +}