fix(admin): 部门成员面板定宽收窄列宽,左树弹性占满剩余宽度
This commit is contained in:
1 parent
90166068ee
commit
26f25d88c0
1 file changed
+25
-13
@@ -251,18 +251,18 @@ onMounted(() => {
|
||||
height="100%"
|
||||
:empty-text="t('admin.dept.members.empty')"
|
||||
>
|
||||
<ElTableColumn :label="t('admin.dept.members.columns.name')" min-width="160">
|
||||
<ElTableColumn :label="t('admin.dept.members.columns.name')" min-width="120">
|
||||
<template #default="{ row }">
|
||||
<div class="admin-dept-member__name">{{ row.real_name || row.username }}</div>
|
||||
<div class="admin-dept-member__sub">{{ row.username }}</div>
|
||||
</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn :label="t('admin.dept.members.columns.contact')" min-width="170">
|
||||
<ElTableColumn :label="t('admin.dept.members.columns.contact')" min-width="150" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ row.phone_number || row.email || '-' }}</template>
|
||||
</ElTableColumn>
|
||||
<ElTableColumn prop="employee_id" :label="t('admin.dept.members.columns.employeeId')" min-width="110" />
|
||||
<ElTableColumn prop="department" :label="t('admin.dept.members.columns.department')" min-width="130" />
|
||||
<ElTableColumn :label="t('admin.dept.members.columns.status')" width="90">
|
||||
<ElTableColumn prop="employee_id" :label="t('admin.dept.members.columns.employeeId')" width="80" show-overflow-tooltip />
|
||||
<ElTableColumn prop="department" :label="t('admin.dept.members.columns.department')" min-width="100" show-overflow-tooltip />
|
||||
<ElTableColumn :label="t('admin.dept.members.columns.status')" width="70">
|
||||
<template #default="{ row }">
|
||||
<ElTag :type="statusTagType(row.status)" effect="light" size="small">
|
||||
{{ statusLabel(row.status) }}
|
||||
@@ -327,9 +327,9 @@ onMounted(() => {
|
||||
align-items: stretch;
|
||||
}
|
||||
.admin-dept-tree {
|
||||
width: 320px;
|
||||
flex-shrink: 0;
|
||||
padding: 12px 8px 12px 32px;
|
||||
flex: 1;
|
||||
min-width: 280px;
|
||||
padding: 12px 8px 12px 24px;
|
||||
border-right: 1px solid var(--el-border-color-lighter);
|
||||
overflow-y: auto;
|
||||
}
|
||||
@@ -390,8 +390,8 @@ onMounted(() => {
|
||||
display: inline-flex;
|
||||
}
|
||||
.admin-dept-members {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
width: min(680px, 55%);
|
||||
flex-shrink: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -401,12 +401,13 @@ onMounted(() => {
|
||||
margin: auto;
|
||||
}
|
||||
.admin-dept-members__header {
|
||||
/* width 由 .admin-dept-members 统一定宽 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
padding: 16px 32px 8px;
|
||||
padding: 16px 24px 8px;
|
||||
}
|
||||
.admin-dept-members__title {
|
||||
min-width: 0;
|
||||
@@ -429,7 +430,7 @@ onMounted(() => {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.admin-dept-members__toolbar {
|
||||
padding: 8px 32px 12px;
|
||||
padding: 8px 24px 12px;
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
.admin-dept-members__search {
|
||||
@@ -444,7 +445,7 @@ onMounted(() => {
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
padding: 12px 32px;
|
||||
padding: 12px 24px;
|
||||
border-top: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
.admin-dept-members__pages {
|
||||
@@ -460,4 +461,15 @@ onMounted(() => {
|
||||
color: var(--el-text-color-secondary);
|
||||
margin-top: 2px;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.admin-dept-body {
|
||||
flex-direction: column;
|
||||
}
|
||||
.admin-dept-tree {
|
||||
max-height: 40vh;
|
||||
}
|
||||
.admin-dept-members {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user