diff --git a/src/component/Detail/DesignDetail.vue b/src/component/Detail/DesignDetail.vue index 4192745e..96baf9ff 100644 --- a/src/component/Detail/DesignDetail.vue +++ b/src/component/Detail/DesignDetail.vue @@ -603,8 +603,11 @@ export default defineComponent({ // detailDom.canvasBox.editFront(str) // } detailDom.canvasBox.editFront(str) - let otherData = await updateOtherLayers('single') - await detailDom.canvasBox.updateOtherLayers(otherData) + if(str == 'canvasEditor'){ + let otherData = await updateOtherLayers('single') + console.log(otherData,'============') + await detailDom.canvasBox.updateOtherLayers(otherData) + } detailData.isEditPattern.value = str } }else{ diff --git a/src/component/Detail/detailRight/editPrintElement.vue b/src/component/Detail/detailRight/editPrintElement.vue index 65942d06..5a0e8b18 100644 --- a/src/component/Detail/detailRight/editPrintElement.vue +++ b/src/component/Detail/detailRight/editPrintElement.vue @@ -252,7 +252,7 @@ export default defineComponent({ designType:data.designType, ifSingle:editPrintElementData.stateOverallSingle == 'single', level2Type:data.level2Type, - location, + location:editPrintElementData.stateOverallSingle == 'single'?location:[0,0], minIOPath:data.minIOPath || data.originalUrl, path:data.url, priority:editPrintElementData.printZIndex, @@ -276,7 +276,8 @@ export default defineComponent({ }else{ let x = Number(style.left.replace(/px/g,'')) let y = Number(style.top.replace(/px/g,'')) - location = [(x*sketchWH[0]) ,(y*sketchWH[1])] + location = item.location + // location = [(x*sketchWH[0]) ,(y*sketchWH[1])] scale = item.scale // scale = [item.pattern.style.width/item.pattern.style.height,item.pattern.style.height/item.pattern.style.width] // location = [item.pattern.style.left,item.pattern.style.top] @@ -901,7 +902,6 @@ export default defineComponent({ const inputFillOffset = (offset:any)=>{ let arr = editPrintElementData.printStyleList[props.type].overall arr[editPrintElementData.imgDomIndex].location = [offset.left * offset.size[0] / 100,offset.top * offset.size[1] / 100] - console.log(arr[editPrintElementData.imgDomIndex].location) editPrintElementDom.pingpuRef.updataList([ { action: ACTIONS.UPDATE, diff --git a/src/component/Detail/detailRight/overallSetting/RepeatSetting.vue b/src/component/Detail/detailRight/overallSetting/RepeatSetting.vue index b1142f27..2f5418db 100644 --- a/src/component/Detail/detailRight/overallSetting/RepeatSetting.vue +++ b/src/component/Detail/detailRight/overallSetting/RepeatSetting.vue @@ -17,7 +17,7 @@ :max="1000" :step="1" is-input - :tipFormatter="(v) => `${scale}%`" + :tipFormatter="(v) => `${scale.toFixed(0)}%`" :value="scale" @input="inputFillScale" /> @@ -121,8 +121,8 @@ ]); const inputFillScale = (e) => { const scale = e / 100; - console.log(scale) - emit("inputFillScale", scale); + console.log(scale.toFixed(2)) + emit("inputFillScale", scale.toFixed(2)); }; const inputOffset = async (e:any)=>{ emit('inputFillOffset', {...e,size: await sketchSize()})