diff --git a/src/admin.css b/src/admin.css index 52ac800..29b25c3 100644 --- a/src/admin.css +++ b/src/admin.css @@ -221,6 +221,10 @@ body { .workspace-tools-body { padding: 20px; } +/* 身份说明与折叠入口分开,避免正文紧贴下一组操作。 */ +.identity-tools-intro { + margin-bottom: 24px; +} .workspace-tools-body .storyboard-controls, .workspace-tools-body .production-controls { display: grid; @@ -886,7 +890,6 @@ body { .n-button:disabled { opacity: 1; } -.n-button.casting-item, .n-button.image-history-item { height: auto; white-space: normal; @@ -897,9 +900,59 @@ body { text-align: left; overflow: hidden; } -.n-button.casting-item .n-button__content { +/* 选角进度按抽屉实际宽度排列;按钮尺寸显式覆盖组件默认值。 */ +.casting-list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); + gap: 12px; + margin-top: 24px; + padding-top: 20px; + border-top: 1px solid var(--app-border); +} +.n-button.casting-item { width: 100%; + min-width: 0; + height: auto; + min-height: 76px; + padding: 12px 14px; + white-space: normal; + text-align: left; + background: var(--app-surface); +} +.n-button.casting-item.selected { + background: var(--app-subtle); + box-shadow: inset 3px 0 0 var(--app-ink); +} +.n-button.casting-item .n-button__content { + display: flex; + width: 100%; + min-width: 0; + align-items: center; justify-content: space-between; + gap: 16px; + text-align: left; +} +.casting-item-identity { + display: flex; + flex-direction: column; + gap: 5px; + min-width: 0; +} +.casting-item-name { + font-size: 14px; + font-weight: 500; + line-height: 1.5; + overflow-wrap: anywhere; +} +.casting-item-ref { + color: var(--app-muted); + font-family: ui-monospace, monospace; + font-size: 11px; + line-height: 1.5; + overflow-wrap: anywhere; +} +.casting-item-status { + flex-shrink: 0; } .search-field { padding: 0; diff --git a/src/components/ui/layout.test.ts b/src/components/ui/layout.test.ts index 429f7a6..f830d13 100644 --- a/src/components/ui/layout.test.ts +++ b/src/components/ui/layout.test.ts @@ -32,6 +32,20 @@ describe('管理后台组件边界', () => { const css = readFileSync('src/admin.css', 'utf8') + readFileSync('src/styles.css', 'utf8') expect(css).not.toMatch(/overflow(?:-[xy])?\s*:\s*(?:auto|scroll)\b/) }) + it('选角面板保留说明间距,卡片按可用宽度排列并覆盖按钮默认高度', () => { + // 保护间距与换行契约,真实宽高和暗色效果仍需浏览器验收。 + const css = readFileSync('src/admin.css', 'utf8') + expect(css).toMatch(/\.identity-tools-intro\s*\{[^}]*margin-bottom:\s*24px/) + expect(css).toMatch( + /\.casting-list\s*\{[^}]*repeat\(auto-fit, minmax\(min\(100%, 260px\), 1fr\)\);[^}]*gap:\s*12px;[^}]*margin-top:\s*24px/ + ) + expect(css).toMatch( + /\.n-button\.casting-item\s*\{[^}]*height:\s*auto;[^}]*min-height:\s*76px;[^}]*padding:\s*12px 14px/ + ) + expect(css).toMatch(/\.casting-item-name\s*\{[^}]*overflow-wrap:\s*anywhere/) + expect(css).toMatch(/\.casting-item-status\s*\{[^}]*flex-shrink:\s*0/) + expect(css).toMatch(/\.n-button\.casting-item\.selected\s*\{[^}]*var\(--app-subtle\)[^}]*var\(--app-ink\)/) + }) it('拆解分栏跟随剩余高度收缩,移动端历史区不挤出结果区', () => { // DOM 环境不计算几何,保护完整的 flex → grid → NScrollbar 高度链。 const css = readFileSync('src/admin.css', 'utf8') diff --git a/src/features/subject-identity/SubjectIdentityPage.vue b/src/features/subject-identity/SubjectIdentityPage.vue index ab7d6ae..969973f 100644 --- a/src/features/subject-identity/SubjectIdentityPage.vue +++ b/src/features/subject-identity/SubjectIdentityPage.vue @@ -166,7 +166,7 @@ watch( title="角色选角总览与批量操作" :has-receipt="!!session.receipt" > -
@@ -294,21 +294,21 @@ watch( > 并发数与本批上限都必须是正整数。
-