fix: 安装明细改为横向表头省略内容 #493
@ -313,33 +313,34 @@
|
||||
}
|
||||
|
||||
.installation-details-table-wrap {
|
||||
overflow-x: hidden;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.installation-details-table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
table-layout: auto;
|
||||
font-size: 0.625rem;
|
||||
}
|
||||
|
||||
.installation-details-table thead th {
|
||||
height: 5.25rem;
|
||||
padding: 0.2rem 0.1rem;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
vertical-align: bottom;
|
||||
line-height: 1.15;
|
||||
height: auto;
|
||||
padding: 0.55rem 0.4rem;
|
||||
writing-mode: horizontal-tb;
|
||||
vertical-align: middle;
|
||||
line-height: 1.25;
|
||||
letter-spacing: 0;
|
||||
white-space: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.installation-details-table tbody td {
|
||||
padding: 0.25rem 0.1rem;
|
||||
vertical-align: top;
|
||||
line-height: 1.25;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
max-width: 8rem;
|
||||
padding: 0.35rem 0.4rem;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
line-height: 1.35;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.installation-details-table .biz-badge {
|
||||
@ -352,7 +353,8 @@
|
||||
|
||||
.installation-details-table th:first-child,
|
||||
.installation-details-table td:first-child {
|
||||
width: 4.75rem;
|
||||
min-width: 7rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.installation-expand {
|
||||
@ -372,20 +374,19 @@
|
||||
}
|
||||
|
||||
.installation-detail-table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
table-layout: auto;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.625rem;
|
||||
}
|
||||
|
||||
.installation-detail-table th,
|
||||
.installation-detail-table td {
|
||||
padding: 0.25rem 0.1rem;
|
||||
padding: 0.35rem 0.4rem;
|
||||
border: 1px solid #e5e0d7;
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@ -393,11 +394,15 @@
|
||||
background: #f3efe6;
|
||||
color: #595959;
|
||||
font-weight: 600;
|
||||
height: 4.75rem;
|
||||
writing-mode: vertical-rl;
|
||||
text-orientation: mixed;
|
||||
vertical-align: bottom;
|
||||
line-height: 1.15;
|
||||
height: auto;
|
||||
writing-mode: horizontal-tb;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.installation-detail-table td {
|
||||
max-width: 9rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.installation-detail-empty,
|
||||
@ -940,7 +945,10 @@
|
||||
const renderDetails = (items) => {
|
||||
if (!items.length) return '<div class="installation-detail-empty">暂无商品明细</div>';
|
||||
const head = columns.map(([, label]) => `<th>${escapeHtml(label)}</th>`).join('');
|
||||
const body = items.map((item) => `<tr>${columns.map(([key]) => `<td>${escapeHtml(item[key])}</td>`).join('')}</tr>`).join('');
|
||||
const body = items.map((item) => `<tr>${columns.map(([key]) => {
|
||||
const value = escapeHtml(item[key]);
|
||||
return `<td title="${value}">${value}</td>`;
|
||||
}).join('')}</tr>`).join('');
|
||||
return `<table class="installation-detail-table"><thead><tr>${head}</tr></thead><tbody>${body}</tbody></table>`;
|
||||
};
|
||||
const detailPanel = document.querySelector('[data-installation-detail-panel]');
|
||||
|
||||
@ -249,6 +249,8 @@ class ManagementCrudTest extends FeatureTestCase
|
||||
->assertSeeText('导出')
|
||||
->assertSee('installation-details-table-wrap', false)
|
||||
->assertSee('installation-details-table', false)
|
||||
->assertSee('writing-mode: horizontal-tb', false)
|
||||
->assertSee('text-overflow: ellipsis', false)
|
||||
->assertSeeText('INSTALL-TEST-001')
|
||||
->assertSeeText('测试安装公司')
|
||||
->assertSeeText('120.50')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user