From 737c8eadebfc0b9c6b29884a5fbbd88458659b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Fri, 14 Nov 2025 11:19:18 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=9A=90=E8=97=8F=E7=94=BB=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/Detail/canvas/index.vue | 6 +++++- src/component/modules/generalMiniCanvas.vue | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/component/Detail/canvas/index.vue b/src/component/Detail/canvas/index.vue index 437de717..a44e31ad 100644 --- a/src/component/Detail/canvas/index.vue +++ b/src/component/Detail/canvas/index.vue @@ -16,6 +16,7 @@ :clothing-image-opts="{ imageMode:'contains', }" + :hideCanvas="hideCanvas" ref="editCanvas"> @@ -37,6 +38,7 @@ :clothing-image-opts="{ imageMode:'contains', }" + :hideCanvas="hideCanvas" ref="editCanvasBackFront"> @@ -63,6 +65,7 @@ import { useStore } from "vuex"; import { useI18n } from 'vue-i18n' import editCanvas from "@/component/Canvas/CanvasEditor/index.vue"; import { formatTime,segmentImage,getMinioUrl } from "@/tool/util"; +import { useRouter, useRoute } from 'vue-router' export default defineComponent({ components:{ @@ -77,7 +80,7 @@ export default defineComponent({ setup(props,{emit}) { const store = useStore(); const {t} = useI18n(); - + const route = useRoute() const detailDom = reactive({ editFrontBack:null as any, model:null, @@ -104,6 +107,7 @@ export default defineComponent({ getCanvasIfEdit:inject('getCanvasIfEdit')as any, canvasInstance:null as any, canvasJSON:'', + hideCanvas: computed(()=>store.state.Workspace.projectPath !== route.fullPath), }) watch(()=>detailData.selectDetail,(newValue,oldValue)=>{ detailData.imgDomIndex = detailData.frontBack.front.findIndex((item:any)=>item.id == newValue.id) diff --git a/src/component/modules/generalMiniCanvas.vue b/src/component/modules/generalMiniCanvas.vue index 255ce6ad..15c579d3 100644 --- a/src/component/modules/generalMiniCanvas.vue +++ b/src/component/modules/generalMiniCanvas.vue @@ -5,6 +5,7 @@ @canvasInit="canvasInit" @changeCanvas="changeCanvas" is-general + :hideCanvas="hideCanvas" :isBackgroundChangeable="false" ref="editCanvas"> @@ -26,6 +27,7 @@ import { Https } from "@/tool/https"; import { useStore } from "vuex"; import { useI18n } from "vue-i18n"; import editCanvas from "@/component/Canvas/CanvasEditor/index.vue"; +import { useRouter, useRoute } from 'vue-router' export default defineComponent({ @@ -53,12 +55,14 @@ export default defineComponent({ const isShowMark = ref(false) const component = reactive({ }) + const route = useRoute() const data = reactive({ canvasLoad:false, canvasJSON:computed(()=>store.state.HomeStoreModule.canvasData.canvas), canvasConfig:{ }, + hideCanvas: computed(()=>store.state.Workspace.projectPath !== route.fullPath), }) watch(()=>data.canvasJSON,(newVal)=>{ dataDom.editCanvas.loadJSON(newVal)