From 6483d769ddc0e4c87402f2c72dd2e7c05f65788b Mon Sep 17 00:00:00 2001 From: 刘有才luck <14606842+liu-youcai-luck@user.noreply.gitee.com> Date: Fri, 6 Dec 2024 16:01:02 +0800 Subject: [PATCH] feat: 代码提交 --- src/views/basic/askTestQuestion/wrongQuestion.vue | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/views/basic/askTestQuestion/wrongQuestion.vue b/src/views/basic/askTestQuestion/wrongQuestion.vue index bd7203f..deb2141 100644 --- a/src/views/basic/askTestQuestion/wrongQuestion.vue +++ b/src/views/basic/askTestQuestion/wrongQuestion.vue @@ -450,12 +450,10 @@ export default { if (value < this.minValue) { this.formData.startScoreRate = this.minValue; // 修正值 } - if (value > this.maxValue) { - this.formData.startScoreRate = this.maxValue; // 修正值 - } if (value > this.formData.endScoreRate) { this.formData.startScoreRate = this.formData.endScoreRate; } + if (!value) { this.formData.startScoreRate = 0; } @@ -465,12 +463,13 @@ export default { if (value < this.minValue) { this.formData.endScoreRate = this.minValue; // 修正值 } - if (value > this.maxValue) { - this.formData.endScoreRate = this.maxValue; // 修正值 - } + if (value < this.formData.startScoreRate) { this.formData.endScoreRate = this.formData.startScoreRate; } + if (value > this.maxValue) { + this.formData.endScoreRate = this.maxValue; // 修正值 + } if (!value) { this.formData.endScoreRate = 0; } @@ -657,23 +656,23 @@ export default { // let a = this.processString(firstP.innerHTML); // firstP.innerHTML = a; // } - const doc = iframeRef.contentDocument || iframeRef.contentWindow.document; - const body = iframeRef.contentWindow.document.body; - body.style.overflowX = "hidden"; // 不允许出现横向滚动条 - 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]; - // 或者修改第一个 < p > 标签的内容; - if (firstP) { - let a = this.processString(firstP.innerHTML); - firstP.innerHTML = a; - } + // const doc = iframeRef.contentDocument || iframeRef.contentWindow.document; + // const body = iframeRef.contentWindow.document.body; + // body.style.overflowX = "hidden"; // 不允许出现横向滚动条 + // 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]; + // // 或者修改第一个 < p > 标签的内容; + // if (firstP) { + // let a = this.processString(firstP.innerHTML); + // firstP.innerHTML = a; + // } }, // 子集删除后 父级需要更新 -- libgit2 0.21.4