diff --git a/resources/views/business/pages/partials/directory-table.blade.php b/resources/views/business/pages/partials/directory-table.blade.php index 74047a0e..d9b09d89 100644 --- a/resources/views/business/pages/partials/directory-table.blade.php +++ b/resources/views/business/pages/partials/directory-table.blade.php @@ -26,6 +26,7 @@ // 字段配置里带 group 的目录表按 Excel 样式渲染两层合并表头:同组字段共用一个一级标题, // 未分组的列标题跨两行显示,列顺序固定为配置顺序。 $directoryHasGroupedHeader = collect($directoryFields)->contains(fn (array $field): bool => filled($field['group'] ?? null)); + $directoryLastFieldName = collect($directoryFields)->last()['name'] ?? null; $directoryIsPaginated = is_object($directoryRows) && method_exists($directoryRows, 'total'); $directoryTotal = $directoryIsPaginated ? $directoryRows->total() : (is_countable($directoryRows) ? count($directoryRows) : 0); $directoryCurrentPage = $directoryIsPaginated ? $directoryRows->currentPage() : 1; @@ -503,6 +504,15 @@ .directory-table[data-grouped-header] thead th[data-directory-group] { font-weight: 700; } + /* 两层表头里每一行的最后一个单元格不一定位于表格最右侧,基础样式的 + th:last-child 会连中间列的右边框一起去掉,右侧跨行一级标题就会断格。 + 这里按字段顺序给真正的最后一列打标记,只让它在表格右边缘不留边框。 */ + .directory-table[data-grouped-header] thead th { + border-right: 1px solid var(--vip-border, #d8d2c7); + } + .directory-table[data-grouped-header] thead th[data-directory-last-column] { + border-right: 0; + } .directory-table[data-grouped-header] th:first-child, .directory-table[data-grouped-header] td:first-child { min-width: 8rem; @@ -1340,7 +1350,7 @@ @foreach ($groupedHeaderRuns as $headerRun) @if ($headerRun['group'] === null) @foreach ($headerRun['fields'] as $field) -