fix(admin): 模型目录 - 修复能力标签颜色与表格布局
This commit is contained in:
1 parent
298b5ebf1f
commit
7dc0c6fccf
3 files changed
+18
-3
No files matched your search
@@ -261,7 +261,7 @@ export default function LogicalModelsPage() {
|
|||||||
toolbarActiveFilters={keyword ? <AdminFilterChip label={`搜索:${keyword}`} onRemove={() => { setKeyword(""); setPage(1); }} /> : null}
|
toolbarActiveFilters={keyword ? <AdminFilterChip label={`搜索:${keyword}`} onRemove={() => { setKeyword(""); setPage(1); }} /> : null}
|
||||||
toolbarActive={Boolean(keyword)}
|
toolbarActive={Boolean(keyword)}
|
||||||
onReset={() => { setKeyword(""); setPage(1); }}
|
onReset={() => { setKeyword(""); setPage(1); }}
|
||||||
table={{ rowKey: "id", size: "small", loading, pagination: false, columns: modelColumns, dataSource: paginatedModels, scroll: { x: 980 } }}
|
table={{ className: "admin-logical-model-table", rowKey: "id", size: "small", loading, pagination: false, columns: modelColumns, dataSource: paginatedModels, scroll: { x: 980 } }}
|
||||||
empty={<AdminTableEmpty filtered={Boolean(deferredKeyword)} title="暂无模型" />}
|
empty={<AdminTableEmpty filtered={Boolean(deferredKeyword)} title="暂无模型" />}
|
||||||
footer={<PaginationBar alwaysShow current={page} pageSize={pageSize} total={filteredModels.length} onChange={(nextPage, nextPageSize) => { setPage(nextPageSize !== pageSize ? 1 : nextPage); setPageSize(nextPageSize); }} />}
|
footer={<PaginationBar alwaysShow current={page} pageSize={pageSize} total={filteredModels.length} onChange={(nextPage, nextPageSize) => { setPage(nextPageSize !== pageSize ? 1 : nextPage); setPageSize(nextPageSize); }} />}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -439,11 +439,11 @@ export function CapabilitySummary({ spec }: { spec: CapabilitySpec }) {
|
|||||||
return (
|
return (
|
||||||
<div className="flex min-w-0 max-w-full flex-wrap gap-1">
|
<div className="flex min-w-0 max-w-full flex-wrap gap-1">
|
||||||
{labels.slice(0, 4).map((label) => (
|
{labels.slice(0, 4).map((label) => (
|
||||||
<Tag key={label} className="max-w-full whitespace-normal break-all text-left leading-5">
|
<Tag key={label} className="admin-capability-summary-tag max-w-full whitespace-normal break-all text-left leading-5">
|
||||||
{label}
|
{label}
|
||||||
</Tag>
|
</Tag>
|
||||||
))}
|
))}
|
||||||
{labels.length > 4 ? <Tag className="shrink-0">+{labels.length - 4}</Tag> : null}
|
{labels.length > 4 ? <Tag className="admin-capability-summary-tag shrink-0">+{labels.length - 4}</Tag> : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7891,6 +7891,21 @@ html:not(.dark) .creation-media-preview-modal .ant-modal-container { background:
|
|||||||
border-inline-start: 0;
|
border-inline-start: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-shell .admin-logical-model-table .ant-table-tbody > tr > td {
|
||||||
|
height: auto;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-shell .admin-logical-model-table .admin-capability-summary-tag {
|
||||||
|
max-width: 100%;
|
||||||
|
margin-inline-end: 0;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
border: 1px solid color-mix(in srgb, var(--foreground) 14%, transparent) !important;
|
||||||
|
background: color-mix(in srgb, var(--foreground) 6%, var(--admin-layer-1)) !important;
|
||||||
|
color: color-mix(in srgb, var(--foreground) 72%, transparent) !important;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.admin-shell .admin-table-clickable-row {
|
.admin-shell .admin-table-clickable-row {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user