mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-09 06:54:11 +08:00
取消 computed
This commit is contained in:
parent
80ec98be2e
commit
2e76d57026
@ -58,9 +58,6 @@ export default {
|
|||||||
frameInitHeight: Number,
|
frameInitHeight: Number,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
cfw() {
|
|
||||||
return this.$refs?.iframe?.contentWindow;
|
|
||||||
},
|
|
||||||
showFrame() {
|
showFrame() {
|
||||||
return this.enableHtml && this.runResultStatus;
|
return this.enableHtml && this.runResultStatus;
|
||||||
},
|
},
|
||||||
@ -79,17 +76,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
frameInit() {
|
frameInit() {
|
||||||
if (!this.cfw) return;
|
let cfw = this.$refs?.iframe?.contentWindow;
|
||||||
|
if (!cfw) return;
|
||||||
let ctx = {
|
let ctx = {
|
||||||
quickcommand: _.cloneDeep(quickcommand),
|
quickcommand: _.cloneDeep(quickcommand),
|
||||||
utools: _.cloneDeep(utools),
|
utools: _.cloneDeep(utools),
|
||||||
parent: undefined,
|
parent: undefined,
|
||||||
};
|
};
|
||||||
Object.assign(this.cfw, ctx);
|
Object.assign(cfw, ctx);
|
||||||
this.cfw.onload = () => {
|
cfw.onload = () => {
|
||||||
this.frameHeight = Math.min(
|
this.frameHeight = Math.min(
|
||||||
this.cfw.document.body.innerText
|
cfw.document.body.innerText
|
||||||
? this.cfw.document.documentElement.getBoundingClientRect().height
|
? cfw.document.documentElement.getBoundingClientRect().height
|
||||||
: 0,
|
: 0,
|
||||||
this.maxHeight
|
this.maxHeight
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user