diff --git a/package-lock.json b/package-lock.json index 599d157..ad978a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "ddei-editor", - "version": "1.2.7", + "version": "1.2.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ddei-editor", - "version": "1.2.7", + "version": "1.2.11", "license": "Apache License 2.0", "dependencies": { - "ddei-framework": "^1.2.34" + "ddei-framework": "^1.2.35" }, "devDependencies": { "@tsconfig/node18": "^18.2.0", @@ -518,9 +518,9 @@ "integrity": "sha512-tdMuLdcJyreope1BWfnYqTQaIkSIrU/KtY9yX5mNGd+tYeJ0Y99ARHDuYnEABPX/8yh/r0Kl169v5ODg2vr98g==" }, "node_modules/ddei-framework": { - "version": "1.2.34", - "resolved": "https://registry.npmjs.org/ddei-framework/-/ddei-framework-1.2.34.tgz", - "integrity": "sha512-YHkwbf29uAb2dMHr96+PafvWCP+/NiU2bT2nJhb3H4kyKcVPCZ9p8twvAokijqRUCMEvo0nYXjv3EpDH0ntnSw==", + "version": "1.2.35", + "resolved": "https://registry.npmjs.org/ddei-framework/-/ddei-framework-1.2.35.tgz", + "integrity": "sha512-5pIclUdYhYB0nodA+3JTna0ZI/IjbAB+KeYloYLOT4mIEIMMwxZD9hieHUqxEO3rAE5SQp6z1OS4nux7zfGDJg==", "dependencies": { "ddei-autolink": "^1.1.1", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 7b4a64a..25a7d87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ddei-editor", - "version": "1.2.9", + "version": "1.2.11-2", "private": false, "type": "module", "author": "hoslay <3697355039@qq.com>", @@ -49,7 +49,7 @@ "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false" }, "dependencies": { - "ddei-framework": "^1.2.34" + "ddei-framework": "^1.2.35" }, "devDependencies": { "@tsconfig/node18": "^18.2.0", @@ -64,4 +64,4 @@ "vite-plugin-compression": "^0.5.1", "vue-tsc": "^1.8.6" } -} \ No newline at end of file +} diff --git a/plugins/core/layouts/StandardLayout.vue b/plugins/core/layouts/StandardLayout.vue index dab9a3d..f1e5e7d 100644 --- a/plugins/core/layouts/StandardLayout.vue +++ b/plugins/core/layouts/StandardLayout.vue @@ -74,19 +74,7 @@ export default { this.$watch("editor.leftWidth", function (newVal, oldVal) { this.$refs.left.style.flexBasis = newVal + "px"; }); - this.$watch("editor.middleWidth", function (newVal, oldVal) { - - //重新设置画布大小 - this.editor.ddInstance.render.setSize( - this.editor.middleWidth, - this.editor.middleHeight, - 0, - 0 - ); - this.editor.ddInstance.bus.push(DDeiEnumBusCommandType.RefreshShape) - this.editor.ddInstance.bus.executeAll() - this.editor.changeState(DDeiEditorState.DESIGNING); - }); + this.$watch("editor.rightWidth", function (newVal, oldVal) { this.$refs.right.style.flexBasis = newVal + "px"; }); @@ -125,18 +113,12 @@ export default { ); this.editor.ddInstance.bus.push(DDeiEnumBusCommandType.RefreshShape); this.editor.ddInstance.bus.executeAll(); - this.editor.leftWidth = this.$refs.left.offsetWidth; - this.editor.rightWidth = this.$refs.right.offsetWidth; - this.editor.topHeight = this.$refs.top.offsetHeight; - this.editor.bottomHeight = this.$refs.bottom.offsetHeight; - this.editor.middleWidth = this.$refs.middle.offsetWidth; - this.editor.middleHeight = this.$refs.middle.offsetHeight; } } }); - // 开始监听目标元素的大小变化 + //开始监听目标元素的大小变化 resizeObserver.observe(middleCanvas); this.editor.leftWidth = this.$refs.left.offsetWidth; @@ -255,7 +237,7 @@ export default { } .middle { - flex: 1; + flex: 1 1 auto; display: flex; flex-direction: column; } diff --git a/src/App.vue b/src/App.vue index e209054..290add7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -271,8 +271,8 @@ export default defineComponent({