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 1/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 2/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 6/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); From 08ef0b8e96b31ffdd7dd547bf20a026fb9d98f39 Mon Sep 17 00:00:00 2001 From: zhangyh Date: Fri, 14 Nov 2025 10:06:44 +0800 Subject: [PATCH 7/7] =?UTF-8?q?feat:=20=E4=BA=A7=E5=93=81=E5=9B=BE?= =?UTF-8?q?=E8=BD=AC=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/tools/poseTransfer/Tips.vue | 82 + .../home/tools/poseTransfer/index.vue | 2287 +++++++++-------- src/lang/cn.ts | 14 +- src/lang/en.ts | 14 +- src/store/homeStore/homeStore.ts | 14 + 5 files changed, 1377 insertions(+), 1034 deletions(-) create mode 100644 src/component/home/tools/poseTransfer/Tips.vue diff --git a/src/component/home/tools/poseTransfer/Tips.vue b/src/component/home/tools/poseTransfer/Tips.vue new file mode 100644 index 00000000..7f67d123 --- /dev/null +++ b/src/component/home/tools/poseTransfer/Tips.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/component/home/tools/poseTransfer/index.vue b/src/component/home/tools/poseTransfer/index.vue index 2f93be4d..981c6879 100644 --- a/src/component/home/tools/poseTransfer/index.vue +++ b/src/component/home/tools/poseTransfer/index.vue @@ -1,1053 +1,1292 @@ + +
+
+
+
{{ $t('ProductImg.Prompt') }}
+ +
+
+
+
{{ $t('poseTransfer.Selectpose') }}
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+ +
+ -
- -
-
-
{{ item.label }}
-
-
-
- -
- - -
- -
- -
-
{{$t('poseTransfer.LikeVideo')}}
-
- -
- -
- -
-
-
-
-
-
{{$t('poseTransfer.InputVideo')}}
-
- -
-
-
- +
+ +
+ + +
+
+
+ + {{ $t('poseTransfer.InputVideo') }} +
+
+ +
+
+
+ \ No newline at end of file + .upload_file_item { + width: 100%; + height: 100%; + :deep(.ant-upload-picture-card-wrapper) { + width: 100% !important; + height: 100%; + .ant-upload-list-picture-card { + width: 100%; + height: 100%; + .ant-upload-select-picture-card { + width: 100%; + height: 100%; + border: 1px solid #000; + background: #fff; + } + } + } + } + .video-type-container { + margin-bottom: 4rem; + .title { + font-size: 1.8rem; + color: #000; + margin-bottom: 1.4rem; + } + :deep(.ant-select) { + width: 100%; + .ant-select-selector { + border: 2px solid #d0d0d0; + border-radius: 1rem; + } + } + } +} + diff --git a/src/lang/cn.ts b/src/lang/cn.ts index ff4a1a7c..53aea1b5 100644 --- a/src/lang/cn.ts +++ b/src/lang/cn.ts @@ -285,7 +285,7 @@ export default { AssitSubTitle: '您可以复制并使用以下提示词:', CopySuccess: '已复制到剪贴板', CopyFiled: '复制失败', - noPrompt:'请输入提示词' + noPrompt: '请输入提示词' }, poseTransfer: { SelectDesign: '产品图', @@ -308,7 +308,11 @@ export default { UploadWithModel: '创建模特穿着该服装的真实感摄影棚照片。若原有模特存在则保留,否则生成合适模特。采用站立姿势面向镜头。精确保留服装细节——图案、颜色、质地及装饰元素。', // 上传线稿,带模特 UploadWithoutModel: - '专业产品摄影:服装以自然形态展示,无模特。采用影棚灯光。保留精确细节——图案、色彩、质感、装饰元素。' // 上传线稿,不带模特 + '专业产品摄影:服装以自然形态展示,无模特。采用影棚灯光。保留精确细节——图案、色彩、质感、装饰元素。', // 上传线稿,不带模特 + VideoType: '视频类型', + FirstFrame: '首帧', + FirstAndLastFrames: '首帧和尾帧', + FirstFrameAndSkeleton: '首帧和骨架' }, LibraryPage: { library: '收藏', @@ -1225,9 +1229,9 @@ export default { basic: '基础', flipHorizontal: '水平翻转', flipVertical: '垂直翻转', - cropAndAdd: '裁剪并添加', - cropImage: '裁剪图片', - group: '组合', + cropAndAdd: '裁剪并添加', + cropImage: '裁剪图片', + group: '组合', //长毛笔 FurSettings: '长毛笔设置', FurLength: '毛发长度', diff --git a/src/lang/en.ts b/src/lang/en.ts index 6aceb62d..3fc1b348 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -295,7 +295,7 @@ export default { AssitSubTitle: 'You can copy following prompt and try:', CopySuccess: 'Copied to clipboard', CopyFiled: 'Failed to copy', - noPrompt:'Please enter prompt' + noPrompt: 'Please enter prompt' }, poseTransfer: { SelectDesign: 'Product image', @@ -318,7 +318,11 @@ export default { UploadWithModel: 'Create realistic studio photo with model wearing this garment. Keep original model if present, or generate appropriate model. Standing pose, facing camera. Preserve exact garment details - patterns, colors, textures, embellishments.', // 上传线稿,带模特 UploadWithoutModel: - 'Professional product photo: garment displayed with natural shape, no model. Studio lighting. Preserve exact details - patterns, colors, textures, embellishments.' // 上传线稿,不带模特 + 'Professional product photo: garment displayed with natural shape, no model. Studio lighting. Preserve exact details - patterns, colors, textures, embellishments.', // 上传线稿,不带模特 + VideoType: 'Video Type', + FirstFrame: 'First frame', + FirstAndLastFrames: 'First and last frames', + FirstFrameAndSkeleton: 'First frame and skeleton', }, LibraryPage: { library: 'Library', @@ -1260,9 +1264,9 @@ export default { basic: 'Basic', flipHorizontal: 'Horizontal Flip', flipVertical: 'Vertical Flip', - cropAndAdd: 'Crop and Add', - cropImage: 'Crop Image', - group: 'Group', + cropAndAdd: 'Crop and Add', + cropImage: 'Crop Image', + group: 'Group', //长毛笔 FurSettings: 'FurSettings', FurLength: 'Fur Length', diff --git a/src/store/homeStore/homeStore.ts b/src/store/homeStore/homeStore.ts index a46cda3c..e855cf3f 100644 --- a/src/store/homeStore/homeStore.ts +++ b/src/store/homeStore/homeStore.ts @@ -41,6 +41,7 @@ const HomeStoreModule : Module = { likedList:[], }, uploadElement:[], + lastFrameList:[], poseTransfer:{ list:[], likedList:[], @@ -70,6 +71,19 @@ const HomeStoreModule : Module = { mutations:{ setshowSketchList(state,data){ state.showSketchList = data + }, + setPoseTransferLastFrameList(state,data){ + console.log('设置尾帧store-------------') + // 支持两种方式:set 替换整个列表;add/删除与 uploadElement 一致 + if(data.str === 'set'){ + state.poseTransfer.lastFrameList = data.list || [] + return + } + if(data.str === 'add'){ + state.poseTransfer.lastFrameList.unshift(...(data.list || [])) + }else{ + state.poseTransfer.lastFrameList.splice(data.index,1) + } }, setDesignCollectionList(state,data){ state.designCollectionList = data