From 56c7a222cf5fba929f285f4ce29c93d5d2de9ed7 Mon Sep 17 00:00:00 2001 From: X1627315083 <1627315083@qq.com> Date: Thu, 13 Nov 2025 13:19:03 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Account/frontPage.vue | 2 +- src/store/userHabit/userHabit.ts | 1 - src/store/workspace/workspace.ts | 4 ++++ src/tool/https.js | 1 + src/views/HomeMain.vue | 2 +- src/views/HomeView/history.vue | 6 +----- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/component/Account/frontPage.vue b/src/component/Account/frontPage.vue index c735153a..6f004078 100644 --- a/src/component/Account/frontPage.vue +++ b/src/component/Account/frontPage.vue @@ -6,7 +6,7 @@ diff --git a/src/store/userHabit/userHabit.ts b/src/store/userHabit/userHabit.ts index f6c51186..946d711a 100644 --- a/src/store/userHabit/userHabit.ts +++ b/src/store/userHabit/userHabit.ts @@ -266,7 +266,6 @@ const userHabit : Module = { // data.systemUser = 0 state.userDetail.affiliate = data.affiliate state.userDetail.systemUser = data.systemUser - // state.userDetail.systemUser = 3 // 身份列表1:可以使用aida系统,2:可以使用affiliate页面,3:系统管理员用户 state.userDetail.systemList = [] if(data.systemUser != 0)state.userDetail.systemList.push(1) diff --git a/src/store/workspace/workspace.ts b/src/store/workspace/workspace.ts index e74c9ecf..08e975d2 100644 --- a/src/store/workspace/workspace.ts +++ b/src/store/workspace/workspace.ts @@ -106,6 +106,10 @@ const Workspace: Module = { model: [] //模特 } }, + createProjectPath(state){ + state.projectPath = '' + state.cachedRoutes = [] + }, setProjectPath(state, path) { state.projectPath = path } diff --git a/src/tool/https.js b/src/tool/https.js index c74f825a..3d685414 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -117,6 +117,7 @@ axios.interceptors.response.use((res) =>{ message.warning('Please login and try again~') store.commit('createDetail') store.commit('createProbject') + store.commit('createProjectPath') setTimeout(()=>[ isLoginTime = false ],2000) diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue index 1cdd34af..4f25e4e2 100644 --- a/src/views/HomeMain.vue +++ b/src/views/HomeMain.vue @@ -1232,7 +1232,7 @@ export default defineComponent({ this.$router.replace('/') this.store.commit('createDetail') this.store.commit('createProbject') - + this.store.commit('createProjectPath') // WriteCookie("token"); // window.location.reload() }, diff --git a/src/views/HomeView/history.vue b/src/views/HomeView/history.vue index c172b58e..9cecb1af 100644 --- a/src/views/HomeView/history.vue +++ b/src/views/HomeView/history.vue @@ -454,11 +454,7 @@ export default defineComponent({ // router.push(`/home?history=${data.id}`) // if(data.id) if(data.id === this.store.state.Workspace.probjects.id){ - let cachedRoutes = this.store.state.Workspace.cachedRoutes - for (let i = cachedRoutes.length - 1; i >= 0; i--) { - cachedRoutes.splice(i, 1); - } - this.store.commit('setProjectPath','') + this.store.commit('createProjectPath','') } // this.getHistoryList() }, From 1c33d42f99f92cba3b6d168ca27026378a9b7a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Thu, 13 Nov 2025 14:54:50 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E7=94=BB=E5=B8=83=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8D=B8=E8=BD=BD=E6=B8=85=E7=90=86=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CanvasEditor/components/CropImage.vue | 10 ---------- .../components/SelectMenuPanel.vue | 4 +--- src/component/Canvas/CanvasEditor/index.vue | 18 +++++++++--------- .../CanvasEditor/managers/LayerManager.js | 6 +++--- .../managers/events/KeyboardManager.js | 13 +------------ 5 files changed, 14 insertions(+), 37 deletions(-) diff --git a/src/component/Canvas/CanvasEditor/components/CropImage.vue b/src/component/Canvas/CanvasEditor/components/CropImage.vue index c2849e03..6eb5d7b7 100644 --- a/src/component/Canvas/CanvasEditor/components/CropImage.vue +++ b/src/component/Canvas/CanvasEditor/components/CropImage.vue @@ -277,16 +277,6 @@ clipData.left = x; clipData.img_width = elInfo.width; clipData.img_height = elInfo.height; - - if (!el.value) return; - const elh = el.value.offsetHeight; - const elsh = el.value.scrollHeight; - const elst = el.value.scrollTop; - if (y < elst) { - el.value.scrollTop = y; - } else if (y + clipInfo.height > elst + elh) { - el.value.scrollTop = y + clipInfo.height - elh; - } }; const mouseup = () => { window.removeEventListener("mousemove", mousemove); diff --git a/src/component/Canvas/CanvasEditor/components/SelectMenuPanel.vue b/src/component/Canvas/CanvasEditor/components/SelectMenuPanel.vue index b7c24f12..c2b5755f 100644 --- a/src/component/Canvas/CanvasEditor/components/SelectMenuPanel.vue +++ b/src/component/Canvas/CanvasEditor/components/SelectMenuPanel.vue @@ -279,9 +279,7 @@ layerManager: props.layerManager, canvas: props.canvas, toolManager: props.toolManager, - }).then(res=>{ - console.log("========",res); - }); + }) }); }; diff --git a/src/component/Canvas/CanvasEditor/index.vue b/src/component/Canvas/CanvasEditor/index.vue index bedc9cbb..aebda612 100644 --- a/src/component/Canvas/CanvasEditor/index.vue +++ b/src/component/Canvas/CanvasEditor/index.vue @@ -530,15 +530,15 @@ onBeforeUnmount(() => { // return; // 开发环境下不卸载组件 // } console.log("onBeforeUnmount 组件卸载,清理资源..."); - // canvasManager?.dispose?.(); - // commandManager?.dispose?.(); - // layerManager?.dispose?.(); - // keyboardManager?.dispose?.(); - // toolManager?.dispose?.(); - // liquifyManager?.dispose?.(); - // selectionManager?.dispose?.(); - // redGreenModeManager?.dispose?.(); - // minimapManager?.dispose?.(); + canvasManager?.dispose?.(); + commandManager?.dispose?.(); + layerManager?.dispose?.(); + keyboardManager?.dispose?.(); + toolManager?.dispose?.(); + liquifyManager?.dispose?.(); + selectionManager?.dispose?.(); + redGreenModeManager?.dispose?.(); +// minimapManager?.dispose?.(); canvasManager = null; commandManager = null; layerManager = null; diff --git a/src/component/Canvas/CanvasEditor/managers/LayerManager.js b/src/component/Canvas/CanvasEditor/managers/LayerManager.js index fc67ea28..ee2d6cc0 100644 --- a/src/component/Canvas/CanvasEditor/managers/LayerManager.js +++ b/src/component/Canvas/CanvasEditor/managers/LayerManager.js @@ -2303,9 +2303,9 @@ export class LayerManager { */ dispose() { // 清空画布 - if (this.canvas) { - this.canvas.clear(); - } + // if (this.canvas) { + // this.canvas.clear(); + // } // 清空图层数据 if (this.layers && this.layers.value) { diff --git a/src/component/Canvas/CanvasEditor/managers/events/KeyboardManager.js b/src/component/Canvas/CanvasEditor/managers/events/KeyboardManager.js index d1298dbf..3e76ec9d 100644 --- a/src/component/Canvas/CanvasEditor/managers/events/KeyboardManager.js +++ b/src/component/Canvas/CanvasEditor/managers/events/KeyboardManager.js @@ -728,18 +728,7 @@ export class KeyboardManager { */ dispose() { // 移除事件监听 - this.container.removeEventListener("keydown", this._handleKeyDown); - this.container.removeEventListener("keyup", this._handleKeyUp); - this.container.removeEventListener("paste", this._handlePaste); - - // 如果有触摸事件,也移除它们 - if (this.isTouchDevice) { - this.container.removeEventListener("touchstart", this._handleTouchStart); - this.container.removeEventListener("touchmove", this._handleTouchMove); - this.container.removeEventListener("touchend", this._handleTouchEnd); - this.container.removeEventListener("touchcancel", this._handleTouchEnd); - } - + this.removeEvents(); // 清除引用 this.toolManager = null; this.commandManager = null; From 0478e95f4f66f7d92fad10e2cc17123fb272bc99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Thu, 13 Nov 2025 16:07:32 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=94=BB=E5=B8=83=E6=96=87=E5=AD=97?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=BC=96=E8=BE=91=E5=85=B3=E9=97=AD=E6=96=87?= =?UTF-8?q?=E5=AD=97=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CanvasEditor/components/TextEditorPanel.vue | 9 ++++++++- src/component/Canvas/CanvasEditor/index.vue | 14 +++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue b/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue index 33a0c17c..2c01a627 100644 --- a/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue +++ b/src/component/Canvas/CanvasEditor/components/TextEditorPanel.vue @@ -620,12 +620,19 @@ export default { // 监听显示文本编辑面板事件 document.addEventListener("showTextEditor", showEditor); document.addEventListener("hideTextEditor", close); - + if(props.canvas) { + // props.canvas.on("text:editing:entered", showEditor); + props.canvas.on("text:editing:exited", close); + } }); onUnmounted(() => { document.removeEventListener("showTextEditor", showEditor); document.removeEventListener("hideTextEditor", close); + if(props.canvas) { + // props.canvas.off("text:editing:entered", showEditor); + props.canvas.off("text:editing:exited", close); + } }); // 返回所有需要在模板中使用的数据和方法 diff --git a/src/component/Canvas/CanvasEditor/index.vue b/src/component/Canvas/CanvasEditor/index.vue index aebda612..69dcdacd 100644 --- a/src/component/Canvas/CanvasEditor/index.vue +++ b/src/component/Canvas/CanvasEditor/index.vue @@ -1209,13 +1209,6 @@ defineExpose({ :activeTool="activeTool" /> - - - + + +
{{ t("Canvas.Scale") }}: {{ currentZoom }}%
-
+
{{ $t("Canvas.color") }}
From 34ee867074aa97c53deadb63e3a27c7b80de2a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Thu, 13 Nov 2025 17:10:05 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E7=94=BB=E7=AC=94=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E8=B7=AF=E5=BE=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../managers/brushes/brushManager.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/component/Canvas/CanvasEditor/managers/brushes/brushManager.js b/src/component/Canvas/CanvasEditor/managers/brushes/brushManager.js index 15ae7463..4fd3df49 100644 --- a/src/component/Canvas/CanvasEditor/managers/brushes/brushManager.js +++ b/src/component/Canvas/CanvasEditor/managers/brushes/brushManager.js @@ -65,7 +65,7 @@ export class BrushManager { description: "基础铅笔工具,适合精细线条绘制", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/pencil.jpg', + imgUrl:'/image/brush/pencil.jpg', }); // 注册材质笔刷 @@ -74,7 +74,7 @@ export class BrushManager { description: "使用纹理图片作为笔刷,支持缩放和透明度", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/texture.jpg', + imgUrl:'/image/brush/texture.jpg', }); // 注册集成的笔刷类型 @@ -83,63 +83,63 @@ export class BrushManager { description: "使用纹理图片作为笔刷,支持缩放和透明度", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/crayon.jpg', + imgUrl:'/image/brush/crayon.jpg', }); brushRegistry.register("fur", FurBrush, { name: this.t("Canvas.Fur"), description: "使用纹理图片作为笔刷,支持缩放和透明度", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/fur.jpg', + imgUrl:'/image/brush/fur.jpg', }); brushRegistry.register("ink", InkBrush, { name: this.t("Canvas.Ink"), description: "墨水笔刷,适合书写和绘图", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/ink.jpg', + imgUrl:'/image/brush/ink.jpg', }); brushRegistry.register("", LongfurBrush, { name: this.t("Canvas.Longfur"), description: "长毛发笔刷,适合绘制动物毛皮、草或头发", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/longFur.jpg', + imgUrl:'/image/brush/longFur.jpg', }); brushRegistry.register("writing", WritingBrush, { name: this.t("Canvas.Writing"), description: "书法笔刷,模拟中国传统书法毛笔效果,具有笔锋和墨色变化", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/writing.jpg', + imgUrl:'/image/brush/writing.jpg', }); brushRegistry.register("marker", MarkerBrush, { name: this.t("Canvas.Marker"), description: "马克笔笔刷,适合粗线条和填充", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/marker.jpg', + imgUrl:'/image/brush/marker.jpg', }); brushRegistry.register("pen", CustomPenBrush, { name: this.t("Canvas.Pen"), description: "自定义钢笔笔刷,适合书写和绘图", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/pen.jpg', + imgUrl:'/image/brush/pen.jpg', }); brushRegistry.register("ribbon", RibbonBrush, { name: this.t("Canvas.Ribbon"), description: "丝带笔刷,适合创建流动的丝带效果", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/ribbon.jpg', + imgUrl:'/image/brush/ribbon.jpg', }); brushRegistry.register("shaded", ShadedBrush, { name: this.t("Canvas.Shaded"), description: "阴影笔刷,适合创建渐变和阴影效果", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/shaded.jpg', + imgUrl:'/image/brush/shaded.jpg', }); brushRegistry.register("spray", SprayBrush, { @@ -147,7 +147,7 @@ export class BrushManager { description: "模拟喷枪效果,创建散点效果", t:this.t, category: this.t('Canvas.BasicBrushes'), - imgUrl:'./image/brush/spray.jpg', + imgUrl:'/image/brush/spray.jpg', }); // brushRegistry.register("sketchy", SketchyBrush);