部分页面添加隐藏画布

This commit is contained in:
李志鹏
2025-11-14 11:19:18 +08:00
parent 23c547c4cc
commit 737c8eadeb
2 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
@canvasInit="canvasInit"
@changeCanvas="changeCanvas"
is-general
:hideCanvas="hideCanvas"
:isBackgroundChangeable="false"
ref="editCanvas"></editCanvas>
</div>
@@ -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)