feat(theme): §14 查看(只读)态隐藏必填星号 *

只读页的红 * 无意义。静态渲染的必填项 value 无输入控件(.cxd-TplField,无input),
用 :has 判定后隐藏 *;编辑态 value 含 input/Select → 不命中,* 照常。
实测:查看 5★全隐、修改 5★全显。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 17:24:02 +08:00
parent a6bcd3a21d
commit 99b15c233d

View File

@@ -449,3 +449,14 @@
.amis-scope .AMISCSSWrapper { .amis-scope .AMISCSSWrapper {
--Form-input-fontSize: 13px; /* 与表格正文 13px 一致(原 14px) */ --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;
}