UPDATE: 优化高度

This commit is contained in:
贾同学
2025-09-05 09:09:18 +08:00
parent 6122f53c8e
commit 6d6d03c03c
2 changed files with 9 additions and 6 deletions

View File

@@ -46,7 +46,7 @@
</div>
</el-col>
</el-row>
<el-scrollbar ref="leftScrollbarRef" :height="props.height" style="margin-top: 20px">
<el-scrollbar ref="leftScrollbarRef" :height="leftHeight" style="margin-top: 20px">
<el-tree
ref="leftTreeRef"
show-checkbox
@@ -121,7 +121,7 @@
</el-scrollbar>
<!-- 传递 footer 插槽到 el-card -->
<template #footer>
<template #footer v-if="!props.disabled">
<slot name="footer"></slot>
</template>
</el-card>
@@ -319,11 +319,14 @@ onMounted(() => {
initTree(props.data)
}
})
const rightHeight = computed(() => {
const leftHeight = computed(() => {
if (!props.disabled) {
return props.height + 45.2
return props.height
}
return props.height
return props.height + 45.2
})
const rightHeight = computed(() => {
return props.height + 45.2
})
watch(
() => props.data,

View File

@@ -188,7 +188,7 @@
:titles="['被检设备列表', '已选被检设备列表']"
filter-placeholder="请输入内容搜索"
:data="devData"
:height="230"
:height="220"
:disabled="allDisabled"
>
<template v-if="planType === 0 && !allDisabled" #footer>