部分页面添加隐藏画布
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
:clothing-image-opts="{
|
||||
imageMode:'contains',
|
||||
}"
|
||||
:hideCanvas="hideCanvas"
|
||||
ref="editCanvas">
|
||||
</editCanvas>
|
||||
<!-- <canvasContent ref="canvasContent"></canvasContent> -->
|
||||
@@ -37,6 +38,7 @@
|
||||
:clothing-image-opts="{
|
||||
imageMode:'contains',
|
||||
}"
|
||||
:hideCanvas="hideCanvas"
|
||||
ref="editCanvasBackFront">
|
||||
</editCanvas>
|
||||
</div>
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user