fix(admin): 部门页布局关键样式全面内联化并修正列宽总和 580/600 失配
This commit is contained in:
1 parent
638a46ad0d
commit
60a8b20bf9
1 file changed
+7
-7
@@ -136,7 +136,7 @@ onMounted(() => {
|
||||
<ElButton text :icon="Fold" :title="t('admin.dept.collapseAll')" @click="collapseAll" />
|
||||
</div>
|
||||
|
||||
<div v-loading="isLoading" class="admin-dept-body">
|
||||
<div v-loading="isLoading" class="admin-dept-body" style="flex: 1; min-height: 0; display: flex; align-items: stretch; overflow-x: auto;">
|
||||
<!-- 左侧:组织树(公司虚拟分组 + 层级缩进);定宽写在 style 上,避免 HMR 样式层滞后导致宽度不生效 -->
|
||||
<div class="admin-dept-tree" style="width: max-content; min-width: 260px; max-width: 45%; flex-shrink: 0;">
|
||||
<ElEmpty v-if="displayRows.length === 0" :description="treeEmptyText" :image-size="80" />
|
||||
@@ -220,7 +220,7 @@ onMounted(() => {
|
||||
</div>
|
||||
|
||||
<!-- 右侧:选中部门的成员面板(OA 口径) -->
|
||||
<div class="admin-dept-members">
|
||||
<div class="admin-dept-members" style="flex: 1; min-width: 280px; min-height: 0; display: flex; flex-direction: column;">
|
||||
<template v-if="!selectedDept">
|
||||
<ElEmpty class="admin-dept-members__empty" :description="t('admin.dept.members.hint')" :image-size="80" />
|
||||
</template>
|
||||
@@ -249,7 +249,7 @@ onMounted(() => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-loading="memberLoading" class="admin-dept-members__tablewrap">
|
||||
<div v-loading="memberLoading" class="admin-dept-members__tablewrap" style="flex: 1 1 0; min-height: 0; width: 600px; max-width: 100%; margin-inline: auto;">
|
||||
<ElTable
|
||||
:data="memberData?.members ?? []"
|
||||
row-key="id"
|
||||
@@ -278,7 +278,7 @@ onMounted(() => {
|
||||
</ElTable>
|
||||
</div>
|
||||
|
||||
<footer v-if="memberData" class="admin-dept-members__footer">
|
||||
<footer v-if="memberData" class="admin-dept-members__footer" style="width: 600px; max-width: 100%; margin-inline: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; row-gap: 8px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--el-border-color-lighter);">
|
||||
<ElPagination
|
||||
background
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@@ -446,14 +446,14 @@ onMounted(() => {
|
||||
width: 16rem;
|
||||
}
|
||||
.admin-dept-members__tablewrap {
|
||||
/* 宽度须与上方五列 width 之和(150+150+90+110+80)保持一致;居中使剩余空白均匀分两侧 */
|
||||
width: 580px;
|
||||
/* 宽度须与上方五列 width 之和(170+150+90+110+80=600)保持一致;居中使剩余空白均匀分两侧 */
|
||||
width: 600px;
|
||||
max-width: 100%;
|
||||
margin-inline: auto;
|
||||
}
|
||||
.admin-dept-members__footer {
|
||||
/* 与表格同宽并同样居中,分页对齐表格右缘 */
|
||||
width: 580px;
|
||||
width: 600px;
|
||||
max-width: 100%;
|
||||
margin-inline: auto;
|
||||
display: flex;
|
||||
|
||||
Reference in new issue
Block a user