From d4cbe7514d396cf58e3fcd77542bb6d91ec3d655 Mon Sep 17 00:00:00 2001 From: 刘有才luck <14606842+liu-youcai-luck@user.noreply.gitee.com> Date: Fri, 6 Dec 2024 14:56:45 +0800 Subject: [PATCH] wip: 细节修改 --- src/views/basic/askTestQuestion/components/wrongQuestionDialog.vue | 34 +++++++++++++++++++++++++++++----- src/views/basic/askTestQuestion/wrongQuestion.vue | 9 ++++++--- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/views/basic/askTestQuestion/components/wrongQuestionDialog.vue b/src/views/basic/askTestQuestion/components/wrongQuestionDialog.vue index 2064141..c6536ce 100644 --- a/src/views/basic/askTestQuestion/components/wrongQuestionDialog.vue +++ b/src/views/basic/askTestQuestion/components/wrongQuestionDialog.vue @@ -37,7 +37,11 @@ style="padding: 0 200px" /> -
+
+
班级:_____________
+
姓名:_____________
+
学号:_____________
+
保存试卷 { + list.push(...item.subQuestionIds); + }); + if (list.length < 1 && !list) { + return true; + } else { + return false; + } + }, }, }; @@ -842,7 +862,11 @@ export default { justify-content: space-around; align-items: center; } - + .binding { + display: flex; + padding: 20px 80px; + justify-content: space-around; + } .test-group { .test-group-title { position: relative; diff --git a/src/views/basic/askTestQuestion/wrongQuestion.vue b/src/views/basic/askTestQuestion/wrongQuestion.vue index c714249..bd7203f 100644 --- a/src/views/basic/askTestQuestion/wrongQuestion.vue +++ b/src/views/basic/askTestQuestion/wrongQuestion.vue @@ -660,7 +660,12 @@ export default { const doc = iframeRef.contentDocument || iframeRef.contentWindow.document; const body = iframeRef.contentWindow.document.body; body.style.overflowX = "hidden"; // 不允许出现横向滚动条 - const height = body.scrollHeight; // 获取内容的高度 + const height = body.offsetHeight; // 获取内容的高度 + console.log(height, "height"); + // console.log("body.offsetHeight:", body.offsetHeight); + // console.log("body.clientHeight:", body.clientHeight); + // console.log("body.scrollHeight:", body.scrollHeight); + iframeRef.style.height = `${height + 20}px`; // 设置 iframe 的高度 // 获取第一个P标签 const firstP = doc.getElementsByTagName("p")[0]; @@ -726,8 +731,6 @@ export default { } } .topic { - height: fit-content; - max-height: 500px; margin-top: 15px; display: flex; flex-direction: column; -- libgit2 0.21.4