From 1b6a1dc8f8bb119fbaba6a0e690606a79d16548c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=B4=E8=B5=9B=E9=9B=B7?= Date: Thu, 25 Apr 2024 17:55:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=92=E4=BB=B6=E5=B0=81?= =?UTF-8?q?=E8=A3=851?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 8 +- package.json | 2 +- .../core/dialogs/ChooseControlGroupDialog.vue | 6 +- .../actions/key-action-cancel-select.ts | 4 +- plugins/core/layouts/StandardLayout.vue | 48 ++++++++++- src/App.vue | 79 ++++++++++++++++--- src/editor/Editor.vue | 39 +-------- 7 files changed, 126 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2158556..41a3b17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.2.7", "license": "Apache License 2.0", "dependencies": { - "ddei-framework": "^1.2.25" + "ddei-framework": "^1.2.32" }, "devDependencies": { "@tsconfig/node18": "^18.2.0", @@ -518,9 +518,9 @@ "integrity": "sha512-tdMuLdcJyreope1BWfnYqTQaIkSIrU/KtY9yX5mNGd+tYeJ0Y99ARHDuYnEABPX/8yh/r0Kl169v5ODg2vr98g==" }, "node_modules/ddei-framework": { - "version": "1.2.25", - "resolved": "https://registry.npmjs.org/ddei-framework/-/ddei-framework-1.2.25.tgz", - "integrity": "sha512-mUD4sEH+HPcTcfxZ+zZpvGRKe25b2WXXE/RMP/7e22BIT6/H3EQ6ES7YzC+YZpV7U4lduxDl7pZNOiyXGVO07g==", + "version": "1.2.32", + "resolved": "https://registry.npmjs.org/ddei-framework/-/ddei-framework-1.2.32.tgz", + "integrity": "sha512-RS+wfr+gjUWqiZarPWUg1xi0yFKvfQKyrZ4otnwivm77ZMF5HOtSPEGIz38pWacava/FWppbYG8u/AMZfhW5TA==", "dependencies": { "ddei-autolink": "^1.1.1", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 2882571..4ea9edf 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false" }, "dependencies": { - "ddei-framework": "^1.2.25" + "ddei-framework": "^1.2.32" }, "devDependencies": { "@tsconfig/node18": "^18.2.0", diff --git a/plugins/core/dialogs/ChooseControlGroupDialog.vue b/plugins/core/dialogs/ChooseControlGroupDialog.vue index 7227237..82cab9e 100644 --- a/plugins/core/dialogs/ChooseControlGroupDialog.vue +++ b/plugins/core/dialogs/ChooseControlGroupDialog.vue @@ -23,7 +23,7 @@ -
+
-
+
@@ -116,6 +116,7 @@ export default { // 获取宽度和高度 const { width, height } = entry.contentRect; if (width != 0 && height != 0) { + this.editor.ddInstance.render.setSize( width, height, @@ -124,6 +125,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; } } @@ -178,6 +185,43 @@ export default { } }) }, + + // resetSize() { + // let layoutRoot = this.$refs.layoutRoot; + // let width = layoutRoot.scrollWidth + // let height = layoutRoot.scrollHeight + // if (!window.upSizeWidth || !window.upSizeHeight) { + // window.upSizeWidth = width; + // window.upSizeHeight = height; + // } else { + // let deltaWidth = width - window.upSizeWidth; + // let deltaHeight = height - window.upSizeHeight; + // if (this.editor.middleWidth + deltaWidth >= 305) { + // window.upSizeWidth = width; + // this.editor.middleWidth += deltaWidth; + // this.editor.maxWidth = + // this.editor.leftWidth + + // this.editor.rightWidth + + // this.editor.middleWidth; + // } + // if (this.editor.middleHeight + deltaHeight >= 305) { + // window.upSizeHeight = height; + // this.editor.middleHeight += deltaHeight; + // this.editor.maxHeight = + // this.editor.leftHeight + + // this.editor.rightHeight + + // this.editor.middleHeight; + // } + // 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(); + // } + // }, } }; @@ -185,7 +229,7 @@ export default {