fix: 操作审计题头结果/IP 列与数据列对齐(镜像 entity 行两 td 盒模型)
VEntity 数据行由两个自带 1rem 左右内边距的 td 组成,end 组紧跟 start 组; 题头原先用 margin-left: auto 把结果/IP 推到行尾,与数据列错位 19rem。 现改为题头 start/end 两组各自镜像 1rem 内边距、end 组不再右推。 已用真实 @halo-dev/components CSS + 同构 DOM 在浏览器实测:五列偏差均为 0。
This commit is contained in:
@@ -242,7 +242,7 @@ onMounted(fetchLogs)
|
||||
</template>
|
||||
</VEmpty>
|
||||
<template v-else>
|
||||
<!-- 列题头:列宽与下方数据行各 VEntityField 的 width 一一对应 -->
|
||||
<!-- 列题头:分组结构与内边距镜像 entity 行的两个 td,列宽与各 VEntityField 的 width 一一对应 -->
|
||||
<div class="audit-header">
|
||||
<div class="header-start">
|
||||
<span class="header-col col-username">操作者 / 时间</span>
|
||||
@@ -381,21 +381,25 @@ onMounted(fetchLogs)
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
/* 列题头:左右内边距与 entity 行(1rem)一致,列宽与数据行字段宽度一一对应 */
|
||||
/* 列题头:VEntity 数据行由两个 td(entity-start-wrapper / entity-end-wrapper)组成,
|
||||
每个 td 自带 1rem 左右内边距,end 组紧跟 start 组之后(行宽由内容收缩,不铺满)。
|
||||
题头按同样结构分两组、各组自带 1rem 内边距,才能与数据列一一对齐;
|
||||
不可用 margin-left: auto 把 end 组推到行尾(数据行并非如此布局)。 */
|
||||
.audit-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.5rem 1rem;
|
||||
padding: 0.5rem 0;
|
||||
border-bottom: 1px solid #eaecf0;
|
||||
}
|
||||
.header-start {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
.header-end {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
margin-left: auto;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
.header-col {
|
||||
font-size: 0.75rem;
|
||||
|
||||
Reference in New Issue
Block a user