mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 22:51:25 +08:00
iframe高度算法修正
This commit is contained in:
parent
1e50cb07ae
commit
01276cb61b
@ -24,7 +24,6 @@
|
|||||||
:enableHtml="enableHtml"
|
:enableHtml="enableHtml"
|
||||||
:runResultStatus="runResultStatus"
|
:runResultStatus="runResultStatus"
|
||||||
:runResult="runResult"
|
:runResult="runResult"
|
||||||
:maxHeight="maxHeight"
|
|
||||||
:key="timeStamp"
|
:key="timeStamp"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -39,7 +38,6 @@
|
|||||||
:enableHtml="enableHtml"
|
:enableHtml="enableHtml"
|
||||||
:runResultStatus="runResultStatus"
|
:runResultStatus="runResultStatus"
|
||||||
:runResult="runResult"
|
:runResult="runResult"
|
||||||
:maxHeight="maxHeight"
|
|
||||||
:key="timeStamp"
|
:key="timeStamp"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,7 +58,6 @@ export default {
|
|||||||
enableHtml: Boolean,
|
enableHtml: Boolean,
|
||||||
runResultStatus: Boolean,
|
runResultStatus: Boolean,
|
||||||
runResult: Object,
|
runResult: Object,
|
||||||
maxHeight: Number,
|
|
||||||
frameInitHeight: Number,
|
frameInitHeight: Number,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -90,12 +89,9 @@ export default {
|
|||||||
};
|
};
|
||||||
Object.assign(cfw, ctx);
|
Object.assign(cfw, ctx);
|
||||||
cfw.onload = () => {
|
cfw.onload = () => {
|
||||||
this.frameHeight = Math.min(
|
this.frameHeight = cfw.document.body.innerText
|
||||||
cfw.document.body.innerText
|
? cfw.document.documentElement.getBoundingClientRect().height
|
||||||
? cfw.document.documentElement.getBoundingClientRect().height
|
: 0;
|
||||||
: 0,
|
|
||||||
this.maxHeight
|
|
||||||
);
|
|
||||||
this.$emit("frameLoad", this.frameHeight);
|
this.$emit("frameLoad", this.frameHeight);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user