mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-07-05 07:32:45 +08:00
frame高度调整
This commit is contained in:
parent
de01de24bb
commit
5c85e86b80
@ -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: {
|
||||||
@ -68,7 +67,7 @@ export default {
|
|||||||
src() {
|
src() {
|
||||||
return this.showFrame
|
return this.showFrame
|
||||||
? window.URL.createObjectURL(
|
? window.URL.createObjectURL(
|
||||||
new Blob([this.frameStyle, this.runResult], {
|
new Blob([this.frameStyle].concat(this.runResult), {
|
||||||
type: "text/html",
|
type: "text/html",
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@ -101,12 +100,9 @@ export default {
|
|||||||
};
|
};
|
||||||
Object.assign(cfw, ctx);
|
Object.assign(cfw, ctx);
|
||||||
cfw.onload = () => {
|
cfw.onload = () => {
|
||||||
this.frameHeight = Math.min(
|
let clientHeight =
|
||||||
cfw.document.body.innerText
|
cfw.document.documentElement.getBoundingClientRect().height;
|
||||||
? cfw.document.documentElement.getBoundingClientRect().height
|
this.frameHeight = clientHeight === 20 ? 0 : clientHeight;
|
||||||
: 0,
|
|
||||||
this.maxHeight
|
|
||||||
);
|
|
||||||
this.$emit("frameLoad", this.frameHeight);
|
this.$emit("frameLoad", this.frameHeight);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user