【修改】 当考点超过固定高度进行可以滚动

This commit is contained in:
dlaren
2025-08-18 15:20:11 +08:00
parent 505e298c18
commit e9a21606b7

View File

@@ -322,15 +322,17 @@
<!-- <el-skeleton :rows="5" animated v-if="pptxPointsList.length < 0 && isLoading" /> <!-- <el-skeleton :rows="5" animated v-if="pptxPointsList.length < 0 && isLoading" />
--> -->
</el-dialog> </el-dialog>
<el-dialog v-model="dialogFormVisiblePptxInfos" :title="titles" width="300px"> <el-dialog v-model="dialogFormVisiblePptxInfos" :title="titles" width="300px" class="fixed-dialog-height">
<el-tree <div class="dialog-scroll-content">
style="max-width: 600px" <el-tree
:data="pptxPointsInfoList" style="max-width: 600px"
:props="defaultProps" :data="pptxPointsInfoList"
:expand-on-click-node="false" :props="defaultProps"
show-checkbox :expand-on-click-node="false"
@check-change="handleCheckChange" show-checkbox
/> @check-change="handleCheckChange"
/>
</div>
<template #footer> <template #footer>
<el-button type="primary" @click="submitPptxPoints"> </el-button> <el-button type="primary" @click="submitPptxPoints"> </el-button>
<el-button @click="dialogFormVisiblePptxInfos = false"> </el-button> <el-button @click="dialogFormVisiblePptxInfos = false"> </el-button>
@@ -469,7 +471,7 @@ const handleCheckChange = (data: any, _checked: boolean, _indeterminate: boolean
pptxPoints.slideIndex = textIndex.value pptxPoints.slideIndex = textIndex.value
pptxPoints.function = data.functions pptxPoints.function = data.functions
pptxPoints.examName = data.chineseName pptxPoints.examName = data.chineseName
pptxPoints.examCode = '111' pptxPoints.examCode = 'ExamCodeTODO'
pptxPoints.method = data.parameter pptxPoints.method = data.parameter
pptxPointsInfosList.push(cloneDeep(pptxPoints)) pptxPointsInfosList.push(cloneDeep(pptxPoints))
} }
@@ -502,6 +504,9 @@ const textIndex = ref()
// 打开 // 打开
const handleNodelClick = async (row: any) => { const handleNodelClick = async (row: any) => {
console.log(row) console.log(row)
if (!row.click) {
return
}
// 获取名称 // 获取名称
chineseName.value = '【' + row.name + '】' chineseName.value = '【' + row.name + '】'
textIndex.value = row.index textIndex.value = row.index
@@ -959,4 +964,19 @@ const openPoints = async () => {
} }
} }
} }
/* 固定 el-dialog 高度,内容超出可滚动 */
.fixed-dialog-height >>> .el-dialog {
height: 500px;
display: flex;
flex-direction: column;
}
.fixed-dialog-height >>> .el-dialog__body {
flex: 1;
overflow: hidden;
padding: 0 20px 20px 20px;
}
.dialog-scroll-content {
height: 400px;
overflow-y: auto;
}
</style> </style>