Commit 6483d769ddc0e4c87402f2c72dd2e7c05f65788b
1 parent
147b8d92
feat: 代码提交
Showing
1 changed file
with
22 additions
and
23 deletions
src/views/basic/askTestQuestion/wrongQuestion.vue
| ... | ... | @@ -450,12 +450,10 @@ export default { |
| 450 | 450 | if (value < this.minValue) { |
| 451 | 451 | this.formData.startScoreRate = this.minValue; // 修正值 |
| 452 | 452 | } |
| 453 | - if (value > this.maxValue) { | |
| 454 | - this.formData.startScoreRate = this.maxValue; // 修正值 | |
| 455 | - } | |
| 456 | 453 | if (value > this.formData.endScoreRate) { |
| 457 | 454 | this.formData.startScoreRate = this.formData.endScoreRate; |
| 458 | 455 | } |
| 456 | + | |
| 459 | 457 | if (!value) { |
| 460 | 458 | this.formData.startScoreRate = 0; |
| 461 | 459 | } |
| ... | ... | @@ -465,12 +463,13 @@ export default { |
| 465 | 463 | if (value < this.minValue) { |
| 466 | 464 | this.formData.endScoreRate = this.minValue; // 修正值 |
| 467 | 465 | } |
| 468 | - if (value > this.maxValue) { | |
| 469 | - this.formData.endScoreRate = this.maxValue; // 修正值 | |
| 470 | - } | |
| 466 | + | |
| 471 | 467 | if (value < this.formData.startScoreRate) { |
| 472 | 468 | this.formData.endScoreRate = this.formData.startScoreRate; |
| 473 | 469 | } |
| 470 | + if (value > this.maxValue) { | |
| 471 | + this.formData.endScoreRate = this.maxValue; // 修正值 | |
| 472 | + } | |
| 474 | 473 | if (!value) { |
| 475 | 474 | this.formData.endScoreRate = 0; |
| 476 | 475 | } |
| ... | ... | @@ -657,23 +656,23 @@ export default { |
| 657 | 656 | // let a = this.processString(firstP.innerHTML); |
| 658 | 657 | // firstP.innerHTML = a; |
| 659 | 658 | // } |
| 660 | - const doc = iframeRef.contentDocument || iframeRef.contentWindow.document; | |
| 661 | - const body = iframeRef.contentWindow.document.body; | |
| 662 | - body.style.overflowX = "hidden"; // 不允许出现横向滚动条 | |
| 663 | - const height = body.offsetHeight; // 获取内容的高度 | |
| 664 | - console.log(height, "height"); | |
| 665 | - // console.log("body.offsetHeight:", body.offsetHeight); | |
| 666 | - // console.log("body.clientHeight:", body.clientHeight); | |
| 667 | - // console.log("body.scrollHeight:", body.scrollHeight); | |
| 668 | - | |
| 669 | - iframeRef.style.height = `${height + 20}px`; // 设置 iframe 的高度 | |
| 670 | - // 获取第一个P标签 | |
| 671 | - const firstP = doc.getElementsByTagName("p")[0]; | |
| 672 | - // 或者修改第一个 < p > 标签的内容; | |
| 673 | - if (firstP) { | |
| 674 | - let a = this.processString(firstP.innerHTML); | |
| 675 | - firstP.innerHTML = a; | |
| 676 | - } | |
| 659 | + // const doc = iframeRef.contentDocument || iframeRef.contentWindow.document; | |
| 660 | + // const body = iframeRef.contentWindow.document.body; | |
| 661 | + // body.style.overflowX = "hidden"; // 不允许出现横向滚动条 | |
| 662 | + // const height = body.offsetHeight; // 获取内容的高度 | |
| 663 | + // console.log(height, "height"); | |
| 664 | + // // console.log("body.offsetHeight:", body.offsetHeight); | |
| 665 | + // // console.log("body.clientHeight:", body.clientHeight); | |
| 666 | + // // console.log("body.scrollHeight:", body.scrollHeight); | |
| 667 | + | |
| 668 | + // iframeRef.style.height = `${height + 20}px`; // 设置 iframe 的高度 | |
| 669 | + // // 获取第一个P标签 | |
| 670 | + // const firstP = doc.getElementsByTagName("p")[0]; | |
| 671 | + // // 或者修改第一个 < p > 标签的内容; | |
| 672 | + // if (firstP) { | |
| 673 | + // let a = this.processString(firstP.innerHTML); | |
| 674 | + // firstP.innerHTML = a; | |
| 675 | + // } | |
| 677 | 676 | }, |
| 678 | 677 | |
| 679 | 678 | // 子集删除后 父级需要更新 | ... | ... |