iframe高度算法修正

This commit is contained in:
fofolee 2022-04-28 22:41:31 +08:00
parent 1e50cb07ae
commit 01276cb61b
2 changed files with 3 additions and 9 deletions

View File

@ -24,7 +24,6 @@
:enableHtml="enableHtml"
:runResultStatus="runResultStatus"
:runResult="runResult"
:maxHeight="maxHeight"
:key="timeStamp"
/>
</div>
@ -39,7 +38,6 @@
:enableHtml="enableHtml"
:runResultStatus="runResultStatus"
:runResult="runResult"
:maxHeight="maxHeight"
:key="timeStamp"
/>
</div>

View File

@ -58,7 +58,6 @@ export default {
enableHtml: Boolean,
runResultStatus: Boolean,
runResult: Object,
maxHeight: Number,
frameInitHeight: Number,
},
computed: {
@ -90,12 +89,9 @@ export default {
};
Object.assign(cfw, ctx);
cfw.onload = () => {
this.frameHeight = Math.min(
cfw.document.body.innerText
this.frameHeight = cfw.document.body.innerText
? cfw.document.documentElement.getBoundingClientRect().height
: 0,
this.maxHeight
);
: 0;
this.$emit("frameLoad", this.frameHeight);
};
},