解决 frame 内变量问题

This commit is contained in:
fofolee
2022-04-23 00:09:33 +08:00
parent 0f9f003c0a
commit f99123518a
3 changed files with 34 additions and 40 deletions

View File

@@ -65,16 +65,9 @@ export default {
},
},
methods: {
frameInit() {
if (!this.showFrame) return;
let ctx = {
quickcommand,
utools,
parent: undefined,
};
Object.assign(this.cfw, _.cloneDeep(ctx));
},
frameLoad() {
this.cfw.quickcommand = _.cloneDeep(quickcommand);
this.cfw.utools = _.cloneDeep(utools);
this.frameHeight = Math.min(
this.cfw.document.documentElement.getBoundingClientRect().height,
this.maxHeight
@@ -82,9 +75,6 @@ export default {
this.$emit("frameLoad");
},
},
mounted() {
this.frameInit();
},
};
</script>