fix(需求池): 修复列表换行和版本解绑状态

This commit is contained in:
Script Generator
2026-07-02 19:50:47 +08:00
parent 121114af6a
commit 554ab520d1
7 changed files with 194 additions and 17 deletions

View File

@@ -0,0 +1,20 @@
export type RequirementTableTextColumn = 'source' | 'project' | 'type' | 'creator';
const TEXT_COLUMN_MAX_WIDTH: Record<RequirementTableTextColumn, string> = {
source: 'max-w-[170px]',
project: 'max-w-[120px]',
type: 'max-w-[96px]',
creator: 'max-w-[96px]',
};
export const REQUIREMENT_TABLE_NOWRAP_CELL_CLASS = 'px-4 py-3 whitespace-nowrap';
export const REQUIREMENT_TABLE_BADGE_CLASS =
'inline-flex h-6 min-w-[3.25rem] shrink-0 items-center justify-center whitespace-nowrap rounded-md px-2 py-0.5 text-[11px] font-medium';
export const REQUIREMENT_TABLE_SMALL_BADGE_CLASS =
'inline-flex h-5 min-w-[2.75rem] shrink-0 items-center justify-center whitespace-nowrap rounded-md px-2 py-0.5 text-[10px] font-medium';
export function getRequirementTableTextClass(column: RequirementTableTextColumn): string {
return `block truncate ${TEXT_COLUMN_MAX_WIDTH[column]}`;
}