diff --git a/plugins/core/layouts/StandardLayout.vue b/plugins/core/layouts/StandardLayout.vue index 9b0f461..bbde952 100644 --- a/plugins/core/layouts/StandardLayout.vue +++ b/plugins/core/layouts/StandardLayout.vue @@ -1,29 +1,26 @@ @@ -59,6 +56,11 @@ export default { initRightWidth: 0, toolboxShow: true, propertyViewShow: true, + leftComponents: [], + rightComponents: [], + topComponents: [], + bottomComponents: [], + middleComponents: [], }; }, //注册组件 @@ -94,9 +96,16 @@ export default { this.$watch("editor.bottomHeight", function (newVal, oldVal) { this.$refs.bottom.style.flexBasis = newVal + "px"; }); + this.leftComponents = this.editor.getPartPanels(this.options, 'left'); + this.rightComponents = this.editor.getPartPanels(this.options, 'right'); + this.topComponents = this.editor.getPartPanels(this.options, 'top'); + this.bottomComponents = this.editor.getPartPanels(this.options, 'bottom'); + this.middleComponents = this.editor.getPartPanels(this.options, 'middle'); }, mounted() { this.editor.layoutViewer = this; + + // 获取要监听的 div 元素 let middleCanvas = document.getElementById(this.editor.id+"_canvas"); diff --git a/src/App.vue b/src/App.vue index b49b96c..d4cd972 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@